Compare commits
	
		
			12 Commits
		
	
	
		
			876f7d8f3c
			...
			projects/z
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 10219fd841 | |||
| 74a2a3b8e5 | |||
| c3b4223e5b | |||
| 070e01c2c4 | |||
| 2665b6a0b0 | |||
| a71fb90e6a | |||
| ac85c83cf9 | |||
| c2e987aee4 | |||
| 0e4ed597cd | |||
| 3e7914ac91 | |||
| 9c19a6197a | |||
| 074b35b6a6 | 
							
								
								
									
										15
									
								
								.env.dev
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								.env.dev
									
									
									
									
									
								
							| @@ -1,26 +1,21 @@ | ||||
| ### | ||||
|  # @Author: Do not edit | ||||
|  # @Date: 2023-08-29 09:40:39 | ||||
|  # @LastEditTime: 2023-11-06 09:08:54 | ||||
|  # @LastEditTime: 2023-10-16 09:22:52 | ||||
|  # @LastEditors: DY | ||||
|  # @Description: | ||||
| ### | ||||
|  # @Description:  | ||||
| ###  | ||||
| # 开发环境配置 | ||||
| ENV = 'development' | ||||
|  | ||||
| # 页面标题 | ||||
| VUE_APP_TITLE = MES系统 | ||||
| VUE_APP_TITLE = 产线监控系统 | ||||
|  | ||||
| # 芋道管理系统/开发环境 | ||||
| # VUE_APP_BASE_API = 'http://100.64.0.26:48082' | ||||
| # VUE_APP_BASE_API = 'http://192.168.0.33:48082' | ||||
| VUE_APP_BASE_API = 'http://192.168.4.173:48080' | ||||
| # VUE_APP_BASE_API = 'http://192.168.2.173:48080' | ||||
| # VUE_APP_BASE_API = 'http://192.168.1.49:48080' | ||||
| # VUE_APP_BASE_API = 'http://192.168.1.8:48080' | ||||
| # VUE_APP_BASE_API = 'http://192.168.1.56:48080' | ||||
| VUE_APP_BASE_API = 'http://192.168.0.33:48080' | ||||
| # VUE_APP_BASE_API = 'http://192.168.1.188:48080' | ||||
| # VUE_APP_BASE_API = 'http://192.168.2.159:48080' | ||||
|  | ||||
| # 路由懒加载 | ||||
| VUE_CLI_BABEL_TRANSPILE_MODULES = true | ||||
|   | ||||
| @@ -41,7 +41,6 @@ | ||||
|     "url": "https://github.com/YunaiV/ruoyi-vue-pro" | ||||
|   }, | ||||
|   "dependencies": { | ||||
|     "@antv/x6": "^2.15.3", | ||||
|     "@babel/parser": "7.18.4", | ||||
|     "@riophae/vue-treeselect": "0.4.0", | ||||
|     "axios": "0.27.2", | ||||
| @@ -71,7 +70,6 @@ | ||||
|     "screenfull": "5.0.2", | ||||
|     "sortablejs": "1.10.2", | ||||
|     "throttle-debounce": "2.1.0", | ||||
|     "uuid": "^9.0.1", | ||||
|     "video.js": "^8.5.2", | ||||
|     "vue": "2.7.14", | ||||
|     "vue-count-to": "1.0.13", | ||||
|   | ||||
							
								
								
									
										
											BIN
										
									
								
								public/static/videos/login.webm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								public/static/videos/login.webm
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| @@ -1,60 +0,0 @@ | ||||
| /* | ||||
|  * @Author: Do not edit | ||||
|  * @Date: 2023-10-21 11:50:46 | ||||
|  * @LastEditTime: 2023-11-03 15:25:55 | ||||
|  * @LastEditors: DY | ||||
|  * @Description:  | ||||
|  */ | ||||
| import request from '@/utils/request' | ||||
|  | ||||
| // 创建异常警告 | ||||
| export function createcoreAlarmLog(data) { | ||||
|   return request({ | ||||
|     url: '/base/core-alarm-log/create', | ||||
|     method: 'post', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 更新异常警告 | ||||
| export function updatecoreAlarmLog(data) { | ||||
|   return request({ | ||||
|     url: '/base/core-alarm-log/update', | ||||
|     method: 'put', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 删除异常警告 | ||||
| export function deletecoreAlarmLog(id) { | ||||
|   return request({ | ||||
|     url: '/base/core-alarm-log/delete?id=' + id, | ||||
|     method: 'delete' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得异常警告 | ||||
| export function getcoreAlarmLog(id) { | ||||
|   return request({ | ||||
|     url: '/base/core-alarm-log/get?id=' + id, | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得警告分页 | ||||
| export function getcoreAlarmLogPage(query) { | ||||
|   return request({ | ||||
|     url: '/base/core-alarm-log/page', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得所有列表 | ||||
| export function getcoreAlarmLogList(query) { | ||||
|   return request({ | ||||
|     url: '/base/core-alarm-log/list', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
| @@ -1,68 +0,0 @@ | ||||
| /* | ||||
|  * @Author: Do not edit | ||||
|  * @Date: 2023-10-21 11:50:46 | ||||
|  * @LastEditTime: 2023-11-02 20:25:36 | ||||
|  * @LastEditors: DY | ||||
|  * @Description:  | ||||
|  */ | ||||
| import request from '@/utils/request' | ||||
|  | ||||
| // 创建客户 | ||||
| export function createCustomer(data) { | ||||
|   return request({ | ||||
|     url: '/base/core-customer/create', | ||||
|     method: 'post', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 更新客户 | ||||
| export function updateCustomer(data) { | ||||
|   return request({ | ||||
|     url: '/base/core-customer/update', | ||||
|     method: 'put', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 删除客户 | ||||
| export function deleteCustomer(id) { | ||||
|   return request({ | ||||
|     url: '/base/core-customer/delete?id=' + id, | ||||
|     method: 'delete' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得客户 | ||||
| export function getCustomer(id) { | ||||
|   return request({ | ||||
|     url: '/base/core-customer/get?id=' + id, | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得客户code | ||||
| export function getCode() { | ||||
|   return request({ | ||||
|     url: '/base/core-customer/getCode', | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得客户分页 | ||||
| export function getCustomerPage(query) { | ||||
|   return request({ | ||||
|     url: '/base/core-customer/page', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得所有列表 | ||||
| export function getCustomerList(query) { | ||||
|   return request({ | ||||
|     url: '/base/core-customer/listAll', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
| @@ -1,68 +0,0 @@ | ||||
| /* | ||||
|  * @Author: Do not edit | ||||
|  * @Date: 2023-10-21 11:50:46 | ||||
|  * @LastEditTime: 2023-10-30 14:37:28 | ||||
|  * @LastEditors: DY | ||||
|  * @Description:  | ||||
|  */ | ||||
| import request from '@/utils/request' | ||||
|  | ||||
| // 创建部门 | ||||
| export function createCoreDepartment(data) { | ||||
|   return request({ | ||||
|     url: '/base/core-department/create', | ||||
|     method: 'post', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 更新部门 | ||||
| export function updateCoreDepartment(data) { | ||||
|   return request({ | ||||
|     url: '/base/core-department/update', | ||||
|     method: 'put', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 删除部门 | ||||
| export function deleteCoreDepartment(id) { | ||||
|   return request({ | ||||
|     url: '/base/core-department/delete?id=' + id, | ||||
|     method: 'delete' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得部门 | ||||
| export function getCoreDepartment(id) { | ||||
|   return request({ | ||||
|     url: '/base/core-department/get?id=' + id, | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得部门code | ||||
| export function getCode() { | ||||
|   return request({ | ||||
|     url: '/base/core-department/getCode', | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得部门分页 | ||||
| export function getCoreDepartmentPage(query) { | ||||
|   return request({ | ||||
|     url: '/base/core-department/page', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得所有列表 | ||||
| export function getCoreDepartmentList(query) { | ||||
|   return request({ | ||||
|     url: '/base/core-department/listAll', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
| @@ -1,68 +0,0 @@ | ||||
| /* | ||||
|  * @Author: Do not edit | ||||
|  * @Date: 2023-10-21 11:50:46 | ||||
|  * @LastEditTime: 2023-10-31 15:11:25 | ||||
|  * @LastEditors: DY | ||||
|  * @Description:  | ||||
|  */ | ||||
| import request from '@/utils/request' | ||||
|  | ||||
| // 创建专业 | ||||
| export function createCoreMajor(data) { | ||||
|   return request({ | ||||
|     url: '/base/core-major/create', | ||||
|     method: 'post', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 更新专业 | ||||
| export function updateCoreMajor(data) { | ||||
|   return request({ | ||||
|     url: '/base/core-major/update', | ||||
|     method: 'put', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 删除专业 | ||||
| export function deleteCoreMajor(id) { | ||||
|   return request({ | ||||
|     url: '/base/core-major/delete?id=' + id, | ||||
|     method: 'delete' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得专业 | ||||
| export function getCoreMajor(id) { | ||||
|   return request({ | ||||
|     url: '/base/core-major/get?id=' + id, | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得专业code | ||||
| export function getCode() { | ||||
|   return request({ | ||||
|     url: '/base/core-major/getCode', | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得专业分页 | ||||
| export function getCoreMajorPage(query) { | ||||
|   return request({ | ||||
|     url: '/base/core-major/page', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得所有列表 | ||||
| export function getCoreMajorList(query) { | ||||
|   return request({ | ||||
|     url: '/base/core-major/listAll', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
| @@ -1,111 +0,0 @@ | ||||
| /* | ||||
|  * @Author: Do not edit | ||||
|  * @Date: 2023-10-21 11:50:46 | ||||
|  * @LastEditTime: 2023-11-04 10:42:50 | ||||
|  * @LastEditors: DY | ||||
|  * @Description:  | ||||
|  */ | ||||
| import request from '@/utils/request' | ||||
|  | ||||
| // 创建产品 | ||||
| export function createCoreProduct(data) { | ||||
|   return request({ | ||||
|     url: '/base/core-product/create', | ||||
|     method: 'post', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 更新产品 | ||||
| export function updateCoreProduct(data) { | ||||
|   return request({ | ||||
|     url: '/base/core-product/update', | ||||
|     method: 'put', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 删除产品 | ||||
| export function deleteCoreProduct(id) { | ||||
|   return request({ | ||||
|     url: '/base/core-product/delete?id=' + id, | ||||
|     method: 'delete' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得产品 | ||||
| export function getCoreProduct(id) { | ||||
|   return request({ | ||||
|     url: '/base/core-product/get?id=' + id, | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得产品code | ||||
| export function getCode() { | ||||
|   return request({ | ||||
|     url: '/base/core-product/getCode', | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得产品分页 | ||||
| export function getCoreProductPage(query) { | ||||
|   return request({ | ||||
|     url: '/base/core-product/page', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得所有列表 | ||||
| export function getCoreProductList(query) { | ||||
|   return request({ | ||||
|     url: '/base/core-product/listAll', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 创建产品属性 | ||||
| export function createCoreProductAttr(data) { | ||||
|   return request({ | ||||
|     url: '/base/core-product-attr/create', | ||||
|     method: 'post', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 更新产品属性 | ||||
| export function updateCoreProductAttr(data) { | ||||
|   return request({ | ||||
|     url: '/base/core-product-attr/update', | ||||
|     method: 'put', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 删除产品属性 | ||||
| export function deleteCoreProductAttr(id) { | ||||
|   return request({ | ||||
|     url: '/base/core-product-attr/delete?id=' + id, | ||||
|     method: 'delete' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得产品属性 | ||||
| export function getCoreProductAttr(id) { | ||||
|   return request({ | ||||
|     url: '/base/core-product-attr/get?id=' + id, | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得产品属性分页 | ||||
| export function getCoreProductAttrPage(query) { | ||||
|   return request({ | ||||
|     url: '/base/core-product-attr/page', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
| @@ -1,68 +0,0 @@ | ||||
| /* | ||||
|  * @Author: Do not edit | ||||
|  * @Date: 2023-10-21 11:50:46 | ||||
|  * @LastEditTime: 2023-11-03 19:06:15 | ||||
|  * @LastEditors: DY | ||||
|  * @Description:  | ||||
|  */ | ||||
| import request from '@/utils/request' | ||||
|  | ||||
| // 创建产线 | ||||
| export function createCorePL(data) { | ||||
|   return request({ | ||||
|     url: '/base/core-production-line/create', | ||||
|     method: 'post', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 更新产线 | ||||
| export function updateCorePL(data) { | ||||
|   return request({ | ||||
|     url: '/base/core-production-line/update', | ||||
|     method: 'put', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 删除产线 | ||||
| export function deleteCorePL(id) { | ||||
|   return request({ | ||||
|     url: '/base/core-production-line/delete?id=' + id, | ||||
|     method: 'delete' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得产线 | ||||
| export function getCorePL(id) { | ||||
|   return request({ | ||||
|     url: '/base/core-production-line/get?id=' + id, | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得产线code | ||||
| export function getCode() { | ||||
|   return request({ | ||||
|     url: '/base/core-production-line/getCode', | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得产线分页 | ||||
| export function getCorePLPage(query) { | ||||
|   return request({ | ||||
|     url: '/base/core-production-line/page', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得所有列表 | ||||
| export function getCorePLList(query) { | ||||
|   return request({ | ||||
|     url: '/base/core-production-line/listAll', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
| @@ -1,68 +0,0 @@ | ||||
| /* | ||||
|  * @Author: Do not edit | ||||
|  * @Date: 2023-10-21 11:50:46 | ||||
|  * @LastEditTime: 2023-11-03 10:39:44 | ||||
|  * @LastEditors: DY | ||||
|  * @Description:  | ||||
|  */ | ||||
| import request from '@/utils/request' | ||||
|  | ||||
| // 创建供应商 | ||||
| export function createCoreSupplier(data) { | ||||
|   return request({ | ||||
|     url: '/base/core-supplier/create', | ||||
|     method: 'post', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 更新供应商 | ||||
| export function updateCoreSupplier(data) { | ||||
|   return request({ | ||||
|     url: '/base/core-supplier/update', | ||||
|     method: 'put', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 删除供应商 | ||||
| export function deleteCoreSupplier(id) { | ||||
|   return request({ | ||||
|     url: '/base/core-supplier/delete?id=' + id, | ||||
|     method: 'delete' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得供应商 | ||||
| export function getCoreSupplier(id) { | ||||
|   return request({ | ||||
|     url: '/base/core-supplier/get?id=' + id, | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得供应商code | ||||
| export function getCode() { | ||||
|   return request({ | ||||
|     url: '/base/core-supplier/getCode', | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得供应商分页 | ||||
| export function getCoreSupplierPage(query) { | ||||
|   return request({ | ||||
|     url: '/base/core-supplier/page', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得所有列表 | ||||
| export function getCoreSupplierList(query) { | ||||
|   return request({ | ||||
|     url: '/base/core-supplier/listAll', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
| @@ -1,111 +0,0 @@ | ||||
| /* | ||||
|  * @Author: Do not edit | ||||
|  * @Date: 2023-10-21 11:50:46 | ||||
|  * @LastEditTime: 2023-11-06 10:50:57 | ||||
|  * @LastEditors: DY | ||||
|  * @Description:  | ||||
|  */ | ||||
| import request from '@/utils/request' | ||||
|  | ||||
| // 创建工单 | ||||
| export function createCoreWO(data) { | ||||
|   return request({ | ||||
|     url: '/base/core-work-order/create', | ||||
|     method: 'post', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 更新工单 | ||||
| export function updateCoreWO(data) { | ||||
|   return request({ | ||||
|     url: '/base/core-work-order/update', | ||||
|     method: 'put', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 删除工单 | ||||
| export function deleteCoreWO(id) { | ||||
|   return request({ | ||||
|     url: '/base/core-work-order/delete?id=' + id, | ||||
|     method: 'delete' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得工单 | ||||
| export function getCoreWO(id) { | ||||
|   return request({ | ||||
|     url: '/base/core-work-order/get?id=' + id, | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得工单code | ||||
| export function getCode() { | ||||
|   return request({ | ||||
|     url: '/base/core-work-order/getCode', | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得工单分页 | ||||
| export function getCoreWOPage(query) { | ||||
|   return request({ | ||||
|     url: '/base/core-work-order/page', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得所有列表 | ||||
| export function getCoreWOList(query) { | ||||
|   return request({ | ||||
|     url: '/base/core-work-order/listbyfilter', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 创建工单预使用原料 | ||||
| export function createCoreWOMa(data) { | ||||
|   return request({ | ||||
|     url: '/base/core-work-order-material/create', | ||||
|     method: 'post', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 更新工单预使用原料 | ||||
| export function updateCoreWOMa(data) { | ||||
|   return request({ | ||||
|     url: '/base/core-work-order-material/update', | ||||
|     method: 'put', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 删除工单预使用原料 | ||||
| export function deleteCoreWOMa(id) { | ||||
|   return request({ | ||||
|     url: '/base/core-work-order-material/delete?id=' + id, | ||||
|     method: 'delete' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得工单预使用原料 | ||||
| export function getCoreWOMa(id) { | ||||
|   return request({ | ||||
|     url: '/base/core-work-order-material/get?id=' + id, | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得工单预使用原料分页 | ||||
| export function getCoreWOMaPage(query) { | ||||
|   return request({ | ||||
|     url: '/base/core-work-order-material/page', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
| @@ -1,103 +0,0 @@ | ||||
| /* | ||||
|  * @Author: Do not edit | ||||
|  * @Date: 2023-10-21 11:50:46 | ||||
|  * @LastEditTime: 2023-11-02 19:49:52 | ||||
|  * @LastEditors: DY | ||||
|  * @Description:  | ||||
|  */ | ||||
| import request from '@/utils/request' | ||||
|  | ||||
| // 创建员工 | ||||
| export function createCoreWorker(data) { | ||||
|   return request({ | ||||
|     url: '/base/core-worker/create', | ||||
|     method: 'post', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 更新员工 | ||||
| export function updateCoreWorker(data) { | ||||
|   return request({ | ||||
|     url: '/base/core-worker/update', | ||||
|     method: 'put', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 删除员工 | ||||
| export function deleteCoreWorker(id) { | ||||
|   return request({ | ||||
|     url: '/base/core-worker/delete?id=' + id, | ||||
|     method: 'delete' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得员工 | ||||
| export function getCoreWorker(id) { | ||||
|   return request({ | ||||
|     url: '/base/core-worker/get?id=' + id, | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得员工code | ||||
| export function getCode() { | ||||
|   return request({ | ||||
|     url: '/base/core-worker/getCode', | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得员工分页 | ||||
| export function getCoreWorkerPage(query) { | ||||
|   return request({ | ||||
|     url: '/base/core-worker/page', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得所有列表 | ||||
| export function getCoreWorkerList(query) { | ||||
|   return request({ | ||||
|     url: '/base/core-worker/listAll', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 创建员工--专业 | ||||
| export function createWoBindMa(data) { | ||||
|   return request({ | ||||
|     url: '/base/core-worker-bind-major/create', | ||||
|     method: 'post', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 更新员工--专业 | ||||
| export function updateWoBindMa(data) { | ||||
|   return request({ | ||||
|     url: '/base/core-worker-bind-major/update', | ||||
|     method: 'put', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 删除员工--专业 | ||||
| export function deleteWoBindMa(id) { | ||||
|   return request({ | ||||
|     url: '/base/core-worker-bind-major/delete?id=' + id, | ||||
|     method: 'delete' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得员工--专业分页 | ||||
| export function getWoBindMaPage(query) { | ||||
|   return request({ | ||||
|     url: '/base/core-worker-bind-major/page', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
| @@ -1,68 +0,0 @@ | ||||
| /* | ||||
|  * @Author: Do not edit | ||||
|  * @Date: 2023-10-21 11:50:46 | ||||
|  * @LastEditTime: 2023-11-03 19:18:00 | ||||
|  * @LastEditors: DY | ||||
|  * @Description:  | ||||
|  */ | ||||
| import request from '@/utils/request' | ||||
|  | ||||
| // 创建工段 | ||||
| export function createCWSection(data) { | ||||
|   return request({ | ||||
|     url: '/base/core-workshop-section/create', | ||||
|     method: 'post', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 更新工段 | ||||
| export function updateCWSection(data) { | ||||
|   return request({ | ||||
|     url: '/base/core-workshop-section/update', | ||||
|     method: 'put', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 删除工段 | ||||
| export function deleteCWSection(id) { | ||||
|   return request({ | ||||
|     url: '/base/core-workshop-section/delete?id=' + id, | ||||
|     method: 'delete' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得工段 | ||||
| export function getCWSection(id) { | ||||
|   return request({ | ||||
|     url: '/base/core-workshop-section/get?id=' + id, | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得工段code | ||||
| export function getCode() { | ||||
|   return request({ | ||||
|     url: '/base/core-workshop-section/getCode', | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得工段分页 | ||||
| export function getCWSectionPage(query) { | ||||
|   return request({ | ||||
|     url: '/base/core-workshop-section/page', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得所有列表 | ||||
| export function getCWSectionList(query) { | ||||
|   return request({ | ||||
|     url: '/base/core-workshop-section/listAll', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
| @@ -1,8 +0,0 @@ | ||||
| import request from '@/utils/request' | ||||
| // 获得所有客户列表 | ||||
| export function getCustomerList() { | ||||
|   return request({ | ||||
|     url: '/base/core-customer/listAll', | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
| @@ -1,73 +0,0 @@ | ||||
| // 成品发货 | ||||
| import request from '@/utils/request' | ||||
| // 获得成品发货清单分页 | ||||
| export function deliveryLogPage(data) { | ||||
|   return request({ | ||||
|     url: '/extend/delivery-log/page', | ||||
|     method: 'post', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获取发货进度分页 | ||||
| export function deliveryProgressPage(data) { | ||||
|   return request({ | ||||
|     url: '/extend/delivery-progress/page', | ||||
|     method: 'post', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获取发货进度分页 | ||||
| export function deliveryLogDetPage(data) { | ||||
|   return request({ | ||||
|     url: '/extend/delivery-log-det/page', | ||||
|     method: 'post', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 创建成品发货清单 | ||||
| export function deliveryLogCreate(data) { | ||||
|   return request({ | ||||
|     url: '/extend/delivery-log/create', | ||||
|     method: 'post', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 更新成品发货清单 | ||||
| export function deliveryLogUpdate(data) { | ||||
|   return request({ | ||||
|     url: '/extend/delivery-log/update', | ||||
|     method: 'put', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得成品发货清单 | ||||
| export function getDeliveryLog(query) { | ||||
|   return request({ | ||||
|     url: '/extend/delivery-log/get', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 删除成品发货清单 | ||||
| export function deliveryLogDelete(query) { | ||||
|   return request({ | ||||
|     url: '/extend/delivery-log/delete', | ||||
|     method: 'delete', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 装车 | ||||
| export function deliveryLogDetCreate(data) { | ||||
|   return request({ | ||||
|     url: '/extend/delivery-log-det/create', | ||||
|     method: 'post', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
| @@ -3,7 +3,7 @@ import request from '@/utils/request' | ||||
| // 创建设备 | ||||
| export function createEquipment(data) { | ||||
|   return request({ | ||||
|     url: '/base/core-equipment/create', | ||||
|     url: '/base/equipment/create', | ||||
|     method: 'post', | ||||
|     data: data | ||||
|   }) | ||||
| @@ -12,7 +12,7 @@ export function createEquipment(data) { | ||||
| // 更新设备 | ||||
| export function updateEquipment(data) { | ||||
|   return request({ | ||||
|     url: '/base/core-equipment/update', | ||||
|     url: '/base/equipment/update', | ||||
|     method: 'put', | ||||
|     data: data | ||||
|   }) | ||||
| @@ -21,7 +21,7 @@ export function updateEquipment(data) { | ||||
| // 删除设备 | ||||
| export function deleteEquipment(id) { | ||||
|   return request({ | ||||
|     url: '/base/core-equipment/delete?id=' + id, | ||||
|     url: '/base/equipment/delete?id=' + id, | ||||
|     method: 'delete' | ||||
|   }) | ||||
| } | ||||
| @@ -29,7 +29,7 @@ export function deleteEquipment(id) { | ||||
| // 获得设备 | ||||
| export function getEquipment(id) { | ||||
|   return request({ | ||||
|     url: '/base/core-equipment/get?id=' + id, | ||||
|     url: '/base/equipment/get?id=' + id, | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
| @@ -37,7 +37,7 @@ export function getEquipment(id) { | ||||
| // 获得设备分页 | ||||
| export function getEquipmentPage(query) { | ||||
|   return request({ | ||||
|     url: '/base/core-equipment/page', | ||||
|     url: '/base/equipment/page', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| @@ -46,7 +46,7 @@ export function getEquipmentPage(query) { | ||||
| // 导出设备 Excel | ||||
| export function exportEquipmentExcel(query) { | ||||
|   return request({ | ||||
|     url: '/base/core-equipment/export-excel', | ||||
|     url: '/base/equipment/export-excel', | ||||
|     method: 'get', | ||||
|     params: query, | ||||
|     responseType: 'blob' | ||||
| @@ -55,7 +55,7 @@ export function exportEquipmentExcel(query) { | ||||
| // 获得所有设备列表 | ||||
| export function getEquipmentAll() { | ||||
|   return request({ | ||||
|     url: '/base/core-equipment/listAll', | ||||
|     url: '/base/equipment/listAll', | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
|   | ||||
| @@ -3,7 +3,7 @@ import request from '@/utils/request' | ||||
| // 创建设备类型 | ||||
| export function createEquipmentType(data) { | ||||
|   return request({ | ||||
|     url: '/base/core-equipment-type/create', | ||||
|     url: '/base/equipment-type/create', | ||||
|     method: 'post', | ||||
|     data: data | ||||
|   }) | ||||
| @@ -12,7 +12,7 @@ export function createEquipmentType(data) { | ||||
| // 更新设备类型 | ||||
| export function updateEquipmentType(data) { | ||||
|   return request({ | ||||
|     url: '/base/core-equipment-type/update', | ||||
|     url: '/base/equipment-type/update', | ||||
|     method: 'put', | ||||
|     data: data | ||||
|   }) | ||||
| @@ -21,7 +21,7 @@ export function updateEquipmentType(data) { | ||||
| // 删除设备类型 | ||||
| export function deleteEquipmentType(id) { | ||||
|   return request({ | ||||
|     url: '/base/core-equipment-type/delete?id=' + id, | ||||
|     url: '/base/equipment-type/delete?id=' + id, | ||||
|     method: 'delete' | ||||
|   }) | ||||
| } | ||||
| @@ -29,7 +29,7 @@ export function deleteEquipmentType(id) { | ||||
| // 获得设备类型 | ||||
| export function getEquipmentType(id) { | ||||
|   return request({ | ||||
|     url: '/base/core-equipment-type/get?id=' + id, | ||||
|     url: '/base/equipment-type/get?id=' + id, | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
| @@ -37,7 +37,7 @@ export function getEquipmentType(id) { | ||||
| // 获得设备类型分页 | ||||
| export function getEquipmentTypePage(query) { | ||||
|   return request({ | ||||
|     url: '/base/core-equipment-type/page', | ||||
|     url: '/base/equipment-type/page', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| @@ -46,7 +46,7 @@ export function getEquipmentTypePage(query) { | ||||
| // 导出设备类型 Excel | ||||
| export function exportEquipmentTypeExcel(query) { | ||||
|   return request({ | ||||
|     url: '/base/core-equipment-type/export-excel', | ||||
|     url: '/base/equipment-type/export-excel', | ||||
|     method: 'get', | ||||
|     params: query, | ||||
|     responseType: 'blob' | ||||
|   | ||||
| @@ -2,7 +2,7 @@ import request from '@/utils/request' | ||||
| // 获得工厂产线工段设备树形结构 | ||||
| export function getTree() { | ||||
|   return request({ | ||||
|     url: '/base/core-factory/getTree', | ||||
|     url: '/base/factory/getTree', | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
| @@ -58,49 +58,3 @@ export function listEnabled() { | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得班组组员信息分页 | ||||
| export function groupTeamPage(query) { | ||||
|   return request({ | ||||
|     url: '/base/group-team-det/page', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得班组组员信息 | ||||
| export function groupTeamDet(query) { | ||||
|   return request({ | ||||
|     url: '/base/group-team-det/get', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
|  | ||||
|  | ||||
| // 创建班组组员信息 | ||||
| export function teamDetCreate(data) { | ||||
|   return request({ | ||||
|     url: '/base/group-team-det/create', | ||||
|     method: 'post', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 更新班组组员信息 | ||||
| export function teamDetUpdate(data) { | ||||
|   return request({ | ||||
|     url: '/base/group-team-det/update', | ||||
|     method: 'put', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 删除班组组员信息 | ||||
| export function teamDetDelete(query) { | ||||
|   return request({ | ||||
|     url: '/base/group-team-det/delete', | ||||
|     method: 'delete', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
|   | ||||
| @@ -25,4 +25,4 @@ export function autoSet(query) { | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
| } | ||||
| @@ -1,121 +0,0 @@ | ||||
| /* | ||||
|  * @Author: Do not edit | ||||
|  * @Date: 2023-10-21 11:50:46 | ||||
|  * @LastEditTime: 2023-10-24 11:22:28 | ||||
|  * @LastEditors: DY | ||||
|  * @Description:  | ||||
|  */ | ||||
| import request from '@/utils/request' | ||||
|  | ||||
| // 创建物料 | ||||
| export function createMaterial(data) { | ||||
|   return request({ | ||||
|     url: '/base/material/create', | ||||
|     method: 'post', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 更新物料 | ||||
| export function updateMaterial(data) { | ||||
|   return request({ | ||||
|     url: '/base/material/update', | ||||
|     method: 'put', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 删除物料 | ||||
| export function deleteMaterial(id) { | ||||
|   return request({ | ||||
|     url: '/base/material/delete?id=' + id, | ||||
|     method: 'delete' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得物料 | ||||
| export function getMaterial(id) { | ||||
|   return request({ | ||||
|     url: '/base/material/get?id=' + id, | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得物料code | ||||
| export function getCode() { | ||||
|   return request({ | ||||
|     url: '/base/material/getMaterialCode', | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得物料分页 | ||||
| export function getMaterialPage(query) { | ||||
|   return request({ | ||||
|     url: '/base/material/page', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得物料列表 | ||||
| export function getMaterialList(query) { | ||||
|   return request({ | ||||
|     url: '/base/material/listbyfilter', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得供应商所有列表 | ||||
| export function getSupplierList(query) { | ||||
|   return request({ | ||||
|     url: '/base/core-supplier/listAll', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得物料属性列表 | ||||
| export function getMaterialAttrList(query) { | ||||
|   return request({ | ||||
|     url: '/base/material-attr/page', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 创建物料属性 | ||||
| export function createMaterialAttr(data) { | ||||
|   return request({ | ||||
|     url: '/base/material-attr/create', | ||||
|     method: 'post', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 更新物料属性 | ||||
| export function updateMaterialAttr(data) { | ||||
|   return request({ | ||||
|     url: '/base/material-attr/update', | ||||
|     method: 'put', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 删除物料属性 | ||||
| export function deleteMaterialAttr(id) { | ||||
|   return request({ | ||||
|     url: '/base/material-attr/delete?id=' + id, | ||||
|     method: 'delete' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得物料属性 | ||||
| export function getMaterialAttr(query) { | ||||
|   return request({ | ||||
|     url: '/base/material-attr/get', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
| @@ -1,68 +0,0 @@ | ||||
| /* | ||||
|  * @Author: Do not edit | ||||
|  * @Date: 2023-10-21 11:50:46 | ||||
|  * @LastEditTime: 2023-10-24 17:09:59 | ||||
|  * @LastEditors: DY | ||||
|  * @Description:  | ||||
|  */ | ||||
| import request from '@/utils/request' | ||||
|  | ||||
| // 创建物料批次 | ||||
| export function createMaterialDate(data) { | ||||
|   return request({ | ||||
|     url: '/base/material-date/create', | ||||
|     method: 'post', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 更新物料批次 | ||||
| export function updateMaterialDate(data) { | ||||
|   return request({ | ||||
|     url: '/base/material-date/update', | ||||
|     method: 'put', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 删除物料批次 | ||||
| export function deleteMaterialDate(id) { | ||||
|   return request({ | ||||
|     url: '/base/material-date/delete?id=' + id, | ||||
|     method: 'delete' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得物料批次 | ||||
| export function getMaterialDate(id) { | ||||
|   return request({ | ||||
|     url: '/base/material-date/getDetail?id=' + id, | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得物料批次code | ||||
| export function getCode() { | ||||
|   return request({ | ||||
|     url: '/base/material-date/getMaterialDateCode', | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得物料批次分页 | ||||
| export function getMaterDatePage(query) { | ||||
|   return request({ | ||||
|     url: '/base/material-date/page', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得物料批次列表 | ||||
| export function getMaterDateList(query) { | ||||
|   return request({ | ||||
|     url: '/base/material-date/listbyfilter', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
| @@ -1,112 +0,0 @@ | ||||
| /* | ||||
|  * @Author: Do not edit | ||||
|  * @Date: 2023-10-21 11:50:46 | ||||
|  * @LastEditTime: 2023-10-26 20:06:29 | ||||
|  * @LastEditors: DY | ||||
|  * @Description:  | ||||
|  */ | ||||
| import request from '@/utils/request' | ||||
|  | ||||
| // 创建产品Bom | ||||
| export function createMaterialPB(data) { | ||||
|   return request({ | ||||
|     url: '/base/material-product-bom/create', | ||||
|     method: 'post', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 更新产品Bom | ||||
| export function updateMaterialPB(data) { | ||||
|   return request({ | ||||
|     url: '/base/material-product-bom/update', | ||||
|     method: 'put', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 删除产品Bom | ||||
| export function deleteMaterialPB(id) { | ||||
|   return request({ | ||||
|     url: '/base/material-product-bom/delete?id=' + id, | ||||
|     method: 'delete' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得产品Bom | ||||
| export function getMaterialPB(id) { | ||||
|   return request({ | ||||
|     url: '/base/material-product-bom/get?id=' + id, | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得产品Bomcode | ||||
| export function getCode() { | ||||
|   return request({ | ||||
|     url: '/base/material-product-bom/getMaterialProductBomCode', | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得产品Bom分页 | ||||
| export function getMaterialPBPage(query) { | ||||
|   return request({ | ||||
|     url: '/base/material-product-bom/page', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得产品Bom列表 | ||||
| export function getMaterialPBList(query) { | ||||
|   return request({ | ||||
|     url: '/base/material-product-bom/listbyfilter', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得产品列表 | ||||
| export function getProList(query) { | ||||
|   return request({ | ||||
|     url: '/base/core-product/listAll', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得产品Bom详细分页 | ||||
| export function getProBomList(query) { | ||||
|   return request({ | ||||
|     url: '/base/material-product-bom-det/page', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 创建产品Bom详细 | ||||
| export function createMaterialPBDet(data) { | ||||
|   return request({ | ||||
|     url: '/base/material-product-bom-det/create', | ||||
|     method: 'post', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 更新产品Bom详细 | ||||
| export function updateMaterialPBDet(data) { | ||||
|   return request({ | ||||
|     url: '/base/material-product-bom-det/update', | ||||
|     method: 'put', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 删除产品Bom详细 | ||||
| export function deleteMaterialPBDet(id) { | ||||
|   return request({ | ||||
|     url: '/base/material-product-bom-det/delete?id=' + id, | ||||
|     method: 'delete' | ||||
|   }) | ||||
| } | ||||
| @@ -1,69 +0,0 @@ | ||||
| /* | ||||
|  * @Author: Do not edit | ||||
|  * @Date: 2023-10-21 11:50:46 | ||||
|  * @LastEditTime: 2023-10-26 09:32:21 | ||||
|  * @LastEditors: DY | ||||
|  * @Description:  | ||||
|  */ | ||||
| import request from '@/utils/request' | ||||
|  | ||||
| // 创建物料使用记录 | ||||
| export function createMaterialLog(data) { | ||||
|   return request({ | ||||
|     url: '/base/material-use-log/create', | ||||
|     method: 'post', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 更新物料使用记录 | ||||
| export function updateMaterialLog(data) { | ||||
|   return request({ | ||||
|     url: '/base/material-use-log/update', | ||||
|     method: 'put', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得物料使用记录 | ||||
| export function getMaterialLog(id) { | ||||
|   return request({ | ||||
|     url: '/base/material-use-log/getDetail?id=' + id, | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得物料使用记录分页 | ||||
| export function getMaterialLogPage(query) { | ||||
|   return request({ | ||||
|     url: '/base/material-use-log/page', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得所有设备列表 | ||||
| export function getEqListAll(query) { | ||||
|   return request({ | ||||
|     url: '/base/core-equipment/listAll', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得所有员工列表 | ||||
| export function getworkerAll(query) { | ||||
|   return request({ | ||||
|     url: '/base/core-worker/listAll', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 删除物料使用记录 | ||||
| export function deleteMaterialLog(id) { | ||||
|   return request({ | ||||
|     url: '/base/material-use-log/delete?id=' + id, | ||||
|     method: 'delete' | ||||
|   }) | ||||
| } | ||||
| @@ -1,68 +0,0 @@ | ||||
| /* | ||||
|  * @Author: zhp | ||||
|  * @Date: 2023-10-18 09:33:57 | ||||
|  * @LastEditTime: 2023-10-18 16:02:09 | ||||
|  * @LastEditors: zhp | ||||
|  * @Description: | ||||
|  */ | ||||
| import request from '@/utils/request' | ||||
|  | ||||
| // 创建包装 | ||||
| export function createPackingType(data) { | ||||
|   return request({ | ||||
|     url: '/base/packaging-print-type/create', | ||||
|     method: 'post', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得包装code | ||||
| export function getCode() { | ||||
|   return request({ | ||||
|     url: '/base/packaging-print-log/getPackagingSerialCode', | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
| // 更新包装 | ||||
| export function updatePackingType(data) { | ||||
|   return request({ | ||||
|     url: '/base/packaging-print-type/update', | ||||
|     method: 'put', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 删除包装 | ||||
| export function deletePackingType(id) { | ||||
|   return request({ | ||||
|     url: '/base/packaging-print-type/delete?id=' + id, | ||||
|     method: 'delete' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得包装 | ||||
| export function getPackingType(id) { | ||||
|   return request({ | ||||
|     url: '/base/packaging-print-type/get?id=' + id, | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得包装分页 | ||||
| export function getPackingTypePage(query) { | ||||
|   return request({ | ||||
|     url: '/base/packaging-print-type/page', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 导出包装 Excel | ||||
| export function exportPackingExcel(query) { | ||||
|   return request({ | ||||
|     url: '/base/packaging-print-type/export-excel', | ||||
|     method: 'get', | ||||
|     params: query, | ||||
|     responseType: 'blob' | ||||
|   }) | ||||
| } | ||||
| @@ -1,140 +0,0 @@ | ||||
| import request from '@/utils/request' | ||||
| // 条件获得订单列表 | ||||
| export function orderList(query) { | ||||
|   return request({ | ||||
|     url: '/base/order/listbyfilter', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 条件获得工单列表 | ||||
| export function workOrderList(query) { | ||||
|   return request({ | ||||
|     url: '/base/core-work-order/listbyfilter', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得订单分页 | ||||
| export function getOrderPage(query) { | ||||
|   return request({ | ||||
|     url: '/base/order/page', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获取订单code | ||||
| export function getOrderCode() { | ||||
|   return request({ | ||||
|     url: '/base/order/getOrderCode', | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获取工单code | ||||
| export function getWorkOrderCode() { | ||||
|   return request({ | ||||
|     url: '/base/order/getWorkOrderCode', | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得订单 | ||||
| export function getOrderById(query) { | ||||
|   return request({ | ||||
|     url: '/base/order/get', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得工艺流程列表 | ||||
| export function getProcessFlowList() { | ||||
|   return request({ | ||||
|     url: '/extend/process-flow/listAll', | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 创建订单 | ||||
| export function orderCreate(data) { | ||||
|   return request({ | ||||
|     url: '/base/order/create', | ||||
|     method: 'post', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 更新订单 | ||||
| export function orderUpdate(data) { | ||||
|   return request({ | ||||
|     url: '/base/order/update', | ||||
|     method: 'put', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 删除订单 | ||||
| export function orderDelete(query) { | ||||
|   return request({ | ||||
|     url: '/base/order/delete', | ||||
|     method: 'delete', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 下发订单,绑定的穿工单id,新建不传 | ||||
| export function orderIssue(data) { | ||||
|   return request({ | ||||
|     url: '/base/order/issue', | ||||
|     method: 'post', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得工单 | ||||
| export function getWorkOrderById(query) { | ||||
|   return request({ | ||||
|     url: '/base/core-work-order/get', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 订单监控 | ||||
| export function orderMonitor(query) { | ||||
|   return request({ | ||||
|     url: '/base/order/orderMonitor', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得所有客户列表 | ||||
| export function customerList() { | ||||
|   return request({ | ||||
|     url: '/base/core-customer/listAll', | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得订单详情 | ||||
| export function orderDetail(query) { | ||||
|   return request({ | ||||
|     url: '/base/order/getDetail', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 产品bom消耗信息 | ||||
| export function bomUseNum(query) { | ||||
|   return request({ | ||||
|     url: '/base/material-product-bom/bomUseNum', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
| @@ -1,92 +0,0 @@ | ||||
| /* | ||||
|  * @Author: zhp | ||||
|  * @Date: 2023-10-18 09:33:57 | ||||
|  * @LastEditTime: 2023-10-18 16:18:12 | ||||
|  * @LastEditors: zhp | ||||
|  * @Description: | ||||
|  */ | ||||
| import request from '@/utils/request' | ||||
|  | ||||
| // 创建包装 | ||||
| export function createPacking(data) { | ||||
|   return request({ | ||||
|     url: '/base/packaging-print-log/create', | ||||
|     method: 'post', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得包装code | ||||
| export function getCode() { | ||||
|   return request({ | ||||
|     url: '/base/packaging-print-log/getPackagingSerialCode', | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
| // 更新包装 | ||||
| export function updatePacking(data) { | ||||
|   return request({ | ||||
|     url: '/base/packaging-print-log/update', | ||||
|     method: 'put', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 删除包装 | ||||
| export function deletePacking(id) { | ||||
|   return request({ | ||||
|     url: '/base/packaging-print-log/delete?id=' + id, | ||||
|     method: 'delete' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得包装 | ||||
| export function getPacking(id) { | ||||
|   return request({ | ||||
|     url: '/base/packaging-print-log/get?id=' + id, | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得包装分页 | ||||
| export function getPackingPage(query) { | ||||
|   return request({ | ||||
|     url: '/base/packaging-print-log/page', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 导出包装 Excel | ||||
| export function exportPackingExcel(query) { | ||||
|   return request({ | ||||
|     url: '/base/packaging-print-log/export-excel', | ||||
|     method: 'get', | ||||
|     params: query, | ||||
|     responseType: 'blob' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| export function getWorkOrderList(query) { | ||||
|   return request({ | ||||
|     url: '/base/core-work-order/listbyfilter', | ||||
|     method: 'get', | ||||
|     params: query, | ||||
|   }) | ||||
| } | ||||
|  | ||||
| export function getCustomerList(query) { | ||||
|   return request({ | ||||
|     url: '/base/core-customer/listAll', | ||||
|     method: 'get', | ||||
|     params: query, | ||||
|   }) | ||||
| } | ||||
|  | ||||
| export function getModelList(query) { | ||||
|   return request({ | ||||
|     url: '/base/packaging-print-model/listbyfilter', | ||||
|     method: 'get', | ||||
|     params: query, | ||||
|   }) | ||||
| } | ||||
| @@ -1,92 +0,0 @@ | ||||
| /* | ||||
|  * @Author: zhp | ||||
|  * @Date: 2023-10-18 09:33:57 | ||||
|  * @LastEditTime: 2023-10-19 15:28:00 | ||||
|  * @LastEditors: zhp | ||||
|  * @Description: | ||||
|  */ | ||||
| import request from '@/utils/request' | ||||
|  | ||||
| // 创建包装 | ||||
| export function createPackingModel(data) { | ||||
|   return request({ | ||||
|     url: '/base/packaging-print-model/create', | ||||
|     method: 'post', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得包装code | ||||
| // export function getCode() { | ||||
| //   return request({ | ||||
| //     url: '/base/packaging-print-log/getPackagingSerialCode', | ||||
| //     method: 'get' | ||||
| //   }) | ||||
| // } | ||||
| // 更新包装 | ||||
| export function updatePackingModel(data) { | ||||
|   return request({ | ||||
|     url: '/base/packaging-print-model/update', | ||||
|     method: 'put', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 删除包装 | ||||
| export function deletePackingModel(id) { | ||||
|   return request({ | ||||
|     url: '/base/packaging-print-model/delete?id=' + id, | ||||
|     method: 'delete' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得包装 | ||||
| export function getPackingModel(id) { | ||||
|   return request({ | ||||
|     url: '/base/packaging-print-model/get?id=' + id, | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得包装分页 | ||||
| export function getPackingModelPage(query) { | ||||
|   return request({ | ||||
|     url: '/base/packaging-print-model/page', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 导出包装 Excel | ||||
| // export function exportPackingExcel(query) { | ||||
| //   return request({ | ||||
| //     url: '/base/packaging-print-log/export-excel', | ||||
| //     method: 'get', | ||||
| //     params: query, | ||||
| //     responseType: 'blob' | ||||
| //   }) | ||||
| // } | ||||
|  | ||||
| // export function getWorkOrderList(query) { | ||||
| //   return request({ | ||||
| //     url: '/base/core-work-order/listbyfilter', | ||||
| //     method: 'get', | ||||
| //     params: query, | ||||
| //   }) | ||||
| // } | ||||
|  | ||||
| // export function getCustomerList(query) { | ||||
| //   return request({ | ||||
| //     url: '/base/core-customer/listAll', | ||||
| //     method: 'get', | ||||
| //     params: query, | ||||
| //   }) | ||||
| // } | ||||
|  | ||||
| export function getTypeList(query) { | ||||
|   return request({ | ||||
|     url: '/base/packaging-print-type/listbyfilter', | ||||
|     method: 'get', | ||||
|     params: query, | ||||
|   }) | ||||
| } | ||||
| @@ -1,8 +0,0 @@ | ||||
| import request from '@/utils/request' | ||||
| // 获得产品列表 | ||||
| export function getProductAll() { | ||||
|   return request({ | ||||
|     url: '/base/core-product/listAll', | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
| @@ -2,7 +2,7 @@ import request from '@/utils/request' | ||||
| // 获得所有工厂产线列表 | ||||
| export function getLineAll() { | ||||
|   return request({ | ||||
|     url: '/base/core-production-line/listAll', | ||||
|     url: '/base/production-line/listAll', | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
| @@ -1,8 +0,0 @@ | ||||
| import request from '@/utils/request' | ||||
| // 获得工单列表 | ||||
| export function workOrderList() { | ||||
|   return request({ | ||||
|     url: '/base/core-work-order/listbyfilter', | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
| @@ -1,26 +0,0 @@ | ||||
| import request from '@/utils/request' | ||||
| // 获得所有员工列表 | ||||
| export function getWorkerList() { | ||||
|   return request({ | ||||
|     url: '/base/core-worker/listAll', | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得员工 | ||||
| export function getWorker(query) { | ||||
|   return request({ | ||||
|     url: '/base/core-worker/get', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得该班组其他可选组员列表(除去现有组员) | ||||
| export function otherWorkerList(query) { | ||||
|   return request({ | ||||
|     url: '/base/group-team-det/otherWorkerList', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
| @@ -2,7 +2,7 @@ import request from '@/utils/request' | ||||
| // 获得所有产线工段列表 | ||||
| export function getWorkShopAll() { | ||||
|   return request({ | ||||
|     url: '/base/core-workshop-section/listAll', | ||||
|     url: '/base/workshop-section/listAll', | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
| @@ -1,16 +1,9 @@ | ||||
| /* | ||||
|  * @Author: Do not edit | ||||
|  * @Date: 2023-10-21 10:11:01 | ||||
|  * @LastEditTime: 2023-11-03 19:03:44 | ||||
|  * @LastEditors: DY | ||||
|  * @Description:  | ||||
|  */ | ||||
| import request from '@/utils/request' | ||||
|  | ||||
| // 创建工厂 | ||||
| export function createFactory(data) { | ||||
|   return request({ | ||||
|     url: '/base/core-factory/create', | ||||
|     url: '/base/factory/create', | ||||
|     method: 'post', | ||||
|     data: data | ||||
|   }) | ||||
| @@ -19,7 +12,7 @@ export function createFactory(data) { | ||||
| // 更新工厂 | ||||
| export function updateFactory(data) { | ||||
|   return request({ | ||||
|     url: '/base/core-factory/update', | ||||
|     url: '/base/factory/update', | ||||
|     method: 'put', | ||||
|     data: data | ||||
|   }) | ||||
| @@ -28,7 +21,7 @@ export function updateFactory(data) { | ||||
| // 删除工厂 | ||||
| export function deleteFactory(id) { | ||||
|   return request({ | ||||
|     url: '/base/core-factory/delete?id=' + id, | ||||
|     url: '/base/factory/delete?id=' + id, | ||||
|     method: 'delete' | ||||
|   }) | ||||
| } | ||||
| @@ -36,30 +29,21 @@ export function deleteFactory(id) { | ||||
| // 获得工厂 | ||||
| export function getFactory(id) { | ||||
|   return request({ | ||||
|     url: '/base/core-factory/get?id=' + id, | ||||
|     url: '/base/factory/get?id=' + id, | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
| // 获得工厂code | ||||
| export function getCode() { | ||||
|   return request({ | ||||
|     url: '/base/core-factory/getCode', | ||||
|     url: '/base/factory/getCode', | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
| // 获得工厂分页 | ||||
| export function getFactoryPage(query) { | ||||
|   return request({ | ||||
|     url: '/base/core-factory/page', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得所有列表 | ||||
| export function getFactoryList(query) { | ||||
|   return request({ | ||||
|     url: '/base/core-factory/listAll', | ||||
|     url: '/base/factory/page', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| @@ -68,7 +52,7 @@ export function getFactoryList(query) { | ||||
| // 导出工厂 Excel | ||||
| export function exportFactoryExcel(query) { | ||||
|   return request({ | ||||
|     url: '/base/core-factory/export-excel', | ||||
|     url: '/base/factory/export-excel', | ||||
|     method: 'get', | ||||
|     params: query, | ||||
|     responseType: 'blob' | ||||
|   | ||||
| @@ -1,27 +0,0 @@ | ||||
| import request from '@/utils/request' | ||||
| // 执行班组追溯 根据工单 | ||||
| export function getByWorkOrder(query) { | ||||
|   return request({ | ||||
|     url: '/monitoring/schedulingmonitoring/getByWorkOrder', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 执行班组追溯详情 根据工单班组 | ||||
| export function getByTeam(query) { | ||||
|   return request({ | ||||
|     url: '/monitoring/schedulingmonitoring/getByTeam', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获取某次排班的生产情况详情 | ||||
| export function getByScheduling(query) { | ||||
|   return request({ | ||||
|     url: '/monitoring/schedulingmonitoring/getByScheduling', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
| @@ -1,19 +0,0 @@ | ||||
| import request from '@/utils/request' | ||||
| // 获取工单信息 | ||||
| export function getWorkOrderMsg(data) { | ||||
|   return request({ | ||||
|     url: '/monitoring/energy-work-order/getWorkOrderMsg', | ||||
|     method: 'post', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获取工单能源消耗数据 | ||||
| export function getOrderEnergyData(data) { | ||||
|   return request({ | ||||
|     url: '/monitoring/energy-work-order/getData', | ||||
|     method: 'post', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| @@ -1,28 +0,0 @@ | ||||
| import request from '@/utils/request' | ||||
|  | ||||
| // 获得排班信息分页 建议size 150 | ||||
| export function groupTeamSchedulingPage(query) { | ||||
|   return request({ | ||||
|     url: '/base/group-team-scheduling/page', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得不同产线每小时报废数据,用于班组检测 班组生产情况详情(动态结构) | ||||
| export function getSchedulingMonitoringRecord(query) { | ||||
|   return request({ | ||||
|     url: '/base/quality-inspection-record/getSchedulingMonitoringRecord', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得所有列表 | ||||
| export function groupClassesListAll(query) { | ||||
|   return request({ | ||||
|     url: '/base/group-classes/listAll', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
| @@ -1,75 +0,0 @@ | ||||
| /* | ||||
|  * @Author: zwq | ||||
|  * @Date: 2023-11-02 14:21:18 | ||||
|  * @LastEditors: zwq | ||||
|  * @LastEditTime: 2023-11-02 14:34:29 | ||||
|  * @Description: | ||||
|  */ | ||||
| import request from '@/utils/request' | ||||
|  | ||||
| // 创建仓库 | ||||
| export function createWarehouse(data) { | ||||
|   return request({ | ||||
|     url: '/extend/warehouse/create', | ||||
|     method: 'post', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 更新仓库 | ||||
| export function updateWarehouse(data) { | ||||
|   return request({ | ||||
|     url: '/extend/warehouse/update', | ||||
|     method: 'put', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 删除仓库 | ||||
| export function deleteWarehouse(id) { | ||||
|   return request({ | ||||
|     url: '/extend/warehouse/delete?id=' + id, | ||||
|     method: 'delete' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得仓库 | ||||
| export function getWarehouse(id) { | ||||
|   return request({ | ||||
|     url: '/extend/warehouse/get?id=' + id, | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得仓库列表 | ||||
| export function getWarehouseList() { | ||||
|   return request({ | ||||
|     url: '/extend/warehouse/listAll', | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
| // 获得仓库code | ||||
| export function getCode() { | ||||
|   return request({ | ||||
|     url: '/extend/warehouse/getCode', | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
| // 获得仓库分页 | ||||
| export function getWarehousePage(query) { | ||||
|   return request({ | ||||
|     url: '/extend/warehouse/page', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 导出仓库 Excel | ||||
| export function exportWarehouseExcel(query) { | ||||
|   return request({ | ||||
|     url: '/extend/warehouse/export-excel', | ||||
|     method: 'get', | ||||
|     params: query, | ||||
|     responseType: 'blob' | ||||
|   }) | ||||
| } | ||||
| @@ -1,76 +0,0 @@ | ||||
| /* | ||||
|  * @Author: zwq | ||||
|  * @Date: 2023-11-02 16:20:15 | ||||
|  * @LastEditors: zwq | ||||
|  * @LastEditTime: 2023-11-03 15:26:05 | ||||
|  * @Description: | ||||
|  */ | ||||
| import request from '@/utils/request' | ||||
|  | ||||
| // 创建物品 | ||||
| export function createWarehouseGoods(data) { | ||||
|   return request({ | ||||
|     url: '/extend/warehouse-goods/create', | ||||
|     method: 'post', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 更新物品 | ||||
| export function updateWarehouseGoods(data) { | ||||
|   return request({ | ||||
|     url: '/extend/warehouse-goods/update', | ||||
|     method: 'put', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 删除物品 | ||||
| export function deleteWarehouseGoods(id) { | ||||
|   return request({ | ||||
|     url: '/extend/warehouse-goods/delete?id=' + id, | ||||
|     method: 'delete' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得物品 | ||||
| export function getWarehouseGoods(id) { | ||||
|   return request({ | ||||
|     url: '/extend/warehouse-goods/get?id=' + id, | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得物品列表 | ||||
| export function getListByType(id) { | ||||
|   return request({ | ||||
|     url: '/extend/warehouse-goods/getListByType?type=' + id, | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得物品分页 | ||||
| export function getWarehouseGoodsPage(data) { | ||||
|   return request({ | ||||
|     url: '/extend/warehouse-goods/page', | ||||
|     method: 'POST', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得code | ||||
| export function getCode() { | ||||
|   return request({ | ||||
|     url: '/extend/warehouse-goods/getCode', | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
| // 导出物品 Excel | ||||
| export function exportWarehouseGoodsExcel(query) { | ||||
|   return request({ | ||||
|     url: '/extend/warehouse-goods/export-excel', | ||||
|     method: 'get', | ||||
|     params: query, | ||||
|     responseType: 'blob' | ||||
|   }) | ||||
| } | ||||
| @@ -1,97 +0,0 @@ | ||||
| /* | ||||
|  * @Author: zwq | ||||
|  * @Date: 2023-11-02 14:31:42 | ||||
|  * @LastEditors: zwq | ||||
|  * @LastEditTime: 2023-11-04 14:56:10 | ||||
|  * @Description: | ||||
|  */ | ||||
| import request from '@/utils/request' | ||||
|  | ||||
| // 创建库位 | ||||
| export function createWarehouseLocation(data) { | ||||
|   return request({ | ||||
|     url: '/extend/warehouse-location/create', | ||||
|     method: 'post', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 更新库位 | ||||
| export function updateWarehouseLocation(data) { | ||||
|   return request({ | ||||
|     url: '/extend/warehouse-location/update', | ||||
|     method: 'put', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 删除库位 | ||||
| export function deleteWarehouseLocation(id) { | ||||
|   return request({ | ||||
|     url: '/extend/warehouse-location/delete?id=' + id, | ||||
|     method: 'delete' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得库位 | ||||
| export function getWarehouseLocation(id) { | ||||
|   return request({ | ||||
|     url: '/extend/warehouse-location/get?id=' + id, | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
| // 获得库位列表(通过仓库id) | ||||
| export function listByWarehouse(id) { | ||||
|   return request({ | ||||
|     url: '/extend/warehouse-location/listByWarehouse?warehouseId=' + id, | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
| // 获得库位列表(All) | ||||
| export function listAll() { | ||||
|   return request({ | ||||
|     url: '/extend/warehouse-location/listAll', | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
| // 获得库位code | ||||
| export function getCode() { | ||||
|   return request({ | ||||
|     url: '/extend/warehouse-location/getCode', | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
| // 获得库位分页 | ||||
| export function getWarehouseLocationPage(data) { | ||||
|   return request({ | ||||
|     url: '/extend/warehouse-location/page', | ||||
|     method: 'POST', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
| // 获得库存总览数据 | ||||
| export function getOverview(data) { | ||||
|   return request({ | ||||
|     url: '/extend/warehouse-monitoring/getOverview', | ||||
|     method: 'POST', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
| // 获得库位占用率数据 | ||||
| export function getRate(data) { | ||||
|   return request({ | ||||
|     url: '/extend/warehouse-monitoring/getRate', | ||||
|     method: 'POST', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 导出库位 Excel | ||||
| export function exportWarehouseLocationExcel(query) { | ||||
|   return request({ | ||||
|     url: '/extend/warehouse-location/export-excel', | ||||
|     method: 'get', | ||||
|     params: query, | ||||
|     responseType: 'blob' | ||||
|   }) | ||||
| } | ||||
| @@ -1,83 +0,0 @@ | ||||
| import request from '@/utils/request' | ||||
|  | ||||
| // 创建出入库-无库位-入库 | ||||
| export function createWarehouseRealtime(data) { | ||||
|   return request({ | ||||
|     url: '/extend/warehouse-realtime/create', | ||||
|     method: 'post', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
| // 创建出入库-无库位-出库 | ||||
| export function outWarehouseRealtime(data) { | ||||
|   return request({ | ||||
|     url: '/extend/warehouse-realtime/out', | ||||
|     method: 'post', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
| // 更新出入库-无库位 | ||||
| export function updateWarehouseRealtime(data) { | ||||
|   return request({ | ||||
|     url: '/extend/warehouse-realtime/update', | ||||
|     method: 'put', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 删除出入库-无库位 | ||||
| export function deleteWarehouseRealtime(id) { | ||||
|   return request({ | ||||
|     url: '/extend/warehouse-realtime/delete?id=' + id, | ||||
|     method: 'delete' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得出入库-无库位 | ||||
| export function getWarehouseRealtime(id) { | ||||
|   return request({ | ||||
|     url: '/extend/warehouse-realtime/get?id=' + id, | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
| // 获得出入库-无库位-展开详情 | ||||
| export function getWarehouseRealtimeDet(id) { | ||||
|   return request({ | ||||
|     url: '/extend/warehouse-realtime/getDet?id=' + id, | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
| // 获得出入库-无库位-批次列表 | ||||
| export function getBatchList(id) { | ||||
|   return request({ | ||||
|     url: '/extend/warehouse-realtime/getBatchList?id=' + id, | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
| // 获得出入库-无库位分页 | ||||
| export function getWarehouseRealtimePage(data) { | ||||
|   return request({ | ||||
|     url: '/extend/warehouse-realtime/page', | ||||
|     method: 'post', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得出入库-无库位-历史分页 | ||||
| export function getWarehouseRealtimeHisPage(data) { | ||||
|   return request({ | ||||
|     url: '/extend/warehouse-his/page', | ||||
|     method: 'post', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 导出出入库-无库位 Excel | ||||
| export function exportWarehouseRealtimeExcel(query) { | ||||
|   return request({ | ||||
|     url: '/extend/warehouse-realtime/export-excel', | ||||
|     method: 'get', | ||||
|     params: query, | ||||
|     responseType: 'blob' | ||||
|   }) | ||||
| } | ||||
| @@ -1,85 +0,0 @@ | ||||
| import request from '@/utils/request' | ||||
|  | ||||
| // 创建出入库-有库位 | ||||
| export function createWarehouseRealtimeLocation(data) { | ||||
|   return request({ | ||||
|     url: '/extend/warehouse-realtime-location/create', | ||||
|     method: 'post', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 更新出入库-有库位 | ||||
| export function updateWarehouseRealtimeLocation(data) { | ||||
|   return request({ | ||||
|     url: '/extend/warehouse-realtime-location/update', | ||||
|     method: 'put', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
| // 出入库-有库位 > 出库操作 | ||||
| export function outWarehouseRealtimeLocation(data) { | ||||
|   return request({ | ||||
|     url: '/extend/warehouse-realtime-location/out', | ||||
|     method: 'post', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 出入库-有库位 > 入库操作 | ||||
| export function inWarehouseRealtimeLocation(data) { | ||||
|   return request({ | ||||
|     url: '/extend/warehouse-realtime-location/in', | ||||
|     method: 'post', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 删除出入库-有库位 | ||||
| export function deleteWarehouseRealtimeLocation(id) { | ||||
|   return request({ | ||||
|     url: '/extend/warehouse-realtime-location/delete?id=' + id, | ||||
|     method: 'delete' | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 获得出入库-有库位 | ||||
| export function getWarehouseRealtimeLocation(id) { | ||||
|   return request({ | ||||
|     url: '/extend/warehouse-realtime-location/get?id=' + id, | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
| // 获得出入库历史-有库位详情列表 | ||||
| export function getWarehouseLocationHisDet(id) { | ||||
|   return request({ | ||||
|     url: '/extend/warehouse-location-his-det/list?hisId=' + id, | ||||
|     method: 'get' | ||||
|   }) | ||||
| } | ||||
| // 获得出入库-有库位分页 | ||||
| export function getWarehouseRealtimeLocationPage(data) { | ||||
|   return request({ | ||||
|     url: '/extend/warehouse-realtime-location/page', | ||||
|     method: 'post', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
| // 获得出入库历史-有库位分页 | ||||
| export function getWarehouseLocationHisPage(data) { | ||||
|   return request({ | ||||
|     url: '/extend/warehouse-location-his/page', | ||||
|     method: 'post', | ||||
|     data: data | ||||
|   }) | ||||
| } | ||||
|  | ||||
| // 导出出入库-有库位 Excel | ||||
| export function exportWarehouseRealtimeLocationExcel(query) { | ||||
|   return request({ | ||||
|     url: '/extend/warehouse-realtime-location/export-excel', | ||||
|     method: 'get', | ||||
|     params: query, | ||||
|     responseType: 'blob' | ||||
|   }) | ||||
| } | ||||
| @@ -1,19 +0,0 @@ | ||||
| <?xml version="1.0" encoding="UTF-8"?> | ||||
| <svg width="10px" height="10px" viewBox="0 0 10 10" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> | ||||
|     <!-- Generator: Sketch 60 (88103) - https://sketch.com --> | ||||
|     <desc>Created with Sketch.</desc> | ||||
|     <g id="11_系统管理" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> | ||||
|         <g id="11-1用户管理" transform="translate(-1764.000000, -160.000000)"> | ||||
|             <g id="编组-15" transform="translate(1763.000000, 158.000000)"> | ||||
|                 <g id="编组-18"> | ||||
|                     <g id="icon/界面内/新增" transform="translate(0.000000, 1.000000)"> | ||||
|                         <g id="编组"> | ||||
|                             <rect id="矩形" stroke="#979797" fill="#D8D8D8" opacity="0" x="0.5" y="0.5" width="11" height="11"></rect> | ||||
|                             <path d="M10.0813953,6.42885117 L6.37790698,6.42885117 L6.37790698,10.0770235 C6.37790698,10.3108355 6.19069767,10.5 5.95930233,10.5 L5.95930233,10.5 C5.72790698,10.5 5.54069767,10.3108355 5.54069767,10.0770235 L5.54069767,6.42885117 L1.91860465,6.42885117 C1.6872093,6.42885117 1.5,6.23968668 1.5,6.00587467 L1.5,6.00587467 C1.5,5.77206266 1.6872093,5.58289817 1.91860465,5.58289817 L5.54069767,5.58289817 L5.54069767,1.9229765 C5.54069767,1.68916449 5.72790698,1.5 5.95930233,1.5 L5.95930233,1.5 C6.19069767,1.5 6.37790698,1.68916449 6.37790698,1.9229765 L6.37790698,5.58289817 L10.0813953,5.58289817 C10.3127907,5.58289817 10.5,5.77206266 10.5,6.00587467 L10.5,6.00587467 C10.5,6.23968668 10.3127907,6.42885117 10.0813953,6.42885117 L10.0813953,6.42885117 Z" id="Shape" fill="#0B58FF" transform="translate(6.000000, 6.000000) scale(1, -1) translate(-6.000000, -6.000000) "></path> | ||||
|                         </g> | ||||
|                     </g> | ||||
|                 </g> | ||||
|             </g> | ||||
|         </g> | ||||
|     </g> | ||||
| </svg> | ||||
| Before Width: | Height: | Size: 1.8 KiB | 
| @@ -1,15 +0,0 @@ | ||||
| <?xml version="1.0" encoding="UTF-8"?> | ||||
| <svg width="14px" height="14px" viewBox="0 0 14 14" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> | ||||
|     <!-- Generator: Sketch 60 (88103) - https://sketch.com --> | ||||
|     <desc>Created with Sketch.</desc> | ||||
|     <g id="11_系统管理" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> | ||||
|         <g id="11-1用户管理" transform="translate(-1822.000000, -159.000000)" fill="#FF5454" fill-rule="nonzero"> | ||||
|             <g id="编组-10" transform="translate(1821.000000, 158.000000)"> | ||||
|                 <g id="删除"> | ||||
|                     <rect id="矩形" opacity="0" x="0" y="0" width="16" height="16"></rect> | ||||
|                     <path d="M9.39137788,11.7149165 C9.13431614,11.7149165 8.92716929,11.5077697 8.92716929,11.2507079 L8.92716929,6.14191781 C8.92716929,5.88485607 9.13431613,5.67770922 9.39137788,5.67770922 C9.64843963,5.67770922 9.85558647,5.88485606 9.85558647,6.14191781 L9.85558647,11.2482122 C9.85558647,11.5052739 9.64843961,11.7149165 9.39137788,11.7149165 Z M6.60612639,11.7149165 C6.34906466,11.7149165 6.1419178,11.5077697 6.1419178,11.2507079 L6.1419178,6.14191781 C6.1419178,5.88485607 6.34906466,5.67770922 6.60612641,5.67770922 C6.86318814,5.67770922 7.07033499,5.88485606 7.07033499,6.14191781 L7.07033499,11.2482122 C7.07033499,11.5052739 6.86318814,11.7149165 6.60612639,11.7149165 Z M14.0359594,3.82087491 L11.7149165,3.82087491 L11.7149165,2.89245775 C11.7149165,2.12376827 11.0959718,1.499832 10.3322738,1.499832 L5.67770923,1.499832 C4.90901976,1.499832 4.28508349,2.12376827 4.28508349,2.89245775 L4.28508349,3.82087491 L1.96404059,3.82087491 C1.70697885,3.82087491 1.499832,4.02802174 1.499832,4.28508349 C1.499832,4.54214524 1.70697884,4.74929208 1.96404059,4.74929208 L14.0359594,4.74929208 C14.2930211,4.74929208 14.500168,4.54214524 14.500168,4.28508349 C14.500168,4.02802174 14.2930212,3.82087491 14.0359594,3.82087491 Z M5.21350066,2.89245775 C5.21350066,2.63789175 5.42314324,2.42824916 5.67770925,2.42824916 L10.3322738,2.42824916 C10.5868398,2.42824916 10.7864994,2.63290025 10.7864994,2.89245775 L10.7864994,3.82087491 L5.21350066,3.82087491 L5.21350066,2.89245775 L5.21350066,2.89245775 Z M11.2507079,14.500168 L4.75178782,14.500168 C3.98309834,14.500168 3.35916207,13.8762317 3.35916207,13.1075423 L3.35916207,6.13692631 C3.35916207,5.87986457 3.56630891,5.67271772 3.82337066,5.67271772 C4.08043241,5.67271772 4.28757925,5.87986456 4.28757925,6.13692631 L4.28757925,13.1075423 C4.28757925,13.364604 4.49722183,13.5717508 4.75178783,13.5717508 L11.2532037,13.5717508 C11.5102654,13.5717508 11.7174123,13.364604 11.7174123,13.1075423 L11.7174123,6.15439653 C11.7174123,5.89733479 11.9245591,5.69018794 12.1816209,5.69018794 C12.4386826,5.69018794 12.6458294,5.89733478 12.6458294,6.15439653 L12.6458294,13.1075423 C12.6433337,13.873736 12.0193974,14.500168 11.2507079,14.500168 Z" id="形状"></path> | ||||
|                 </g> | ||||
|             </g> | ||||
|         </g> | ||||
|     </g> | ||||
| </svg> | ||||
| Before Width: | Height: | Size: 2.9 KiB | 
							
								
								
									
										
											BIN
										
									
								
								src/assets/images/login-bg.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								src/assets/images/login-bg.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 137 KiB | 
							
								
								
									
										
											BIN
										
									
								
								src/assets/logo/cnbm.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								src/assets/logo/cnbm.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 1.9 KiB | 
| @@ -1,10 +1,13 @@ | ||||
| /* ===== PC DESIGN ===== */ | ||||
| $W: 1000; | ||||
| $W: 1080; | ||||
| $H: 1920; | ||||
| $picW: 438; | ||||
| $picH: 560; | ||||
| $formW: 320; | ||||
| // $picW: 438; | ||||
| // $picH: 560; | ||||
| $picW: 1080; | ||||
| $picH: 1118; | ||||
| $formW: 420; | ||||
| $tabW: $formW / 2; | ||||
| // $rowH: 56; | ||||
| $rowH: 56; | ||||
| $buttonH: 50; | ||||
|  | ||||
| @@ -15,6 +18,7 @@ $containerBgImage: '../assets/images/bg.png'; | ||||
| $logoWidth: 417px; | ||||
| $logoHeight: 64px; | ||||
| $logoImage: '../assets/logo/login-logo.png'; | ||||
| $cnbmLogo: '../assets/logo/cnbm.png'; | ||||
| // container-content | ||||
| $contentWidth: round($W / $H * 100) * 1vw; | ||||
| $contentHeight: round($picH / $W * 100) / 100 * $contentWidth; | ||||
| @@ -22,7 +26,8 @@ $contentBgColor: #ffffff; | ||||
| // container-content-pic | ||||
| $picWidth: round($picW / $H * 100) * 1vw; | ||||
| $picHeight: inherit; | ||||
| $picImage: '../assets/images/pic.png'; | ||||
| // $picImage: '../assets/images/pic.png'; | ||||
| $picImage: '../assets/images/login-bg.png'; | ||||
| // container-content-field | ||||
| $fieldWidth: $contentWidth - $picWidth; | ||||
| $fieldHeight: inherit; | ||||
| @@ -34,231 +39,310 @@ $buttonHeight: $buttonH * 1px; | ||||
|  | ||||
| // - - - - - 页面基础设置 | ||||
| .container { | ||||
|   .login-code { | ||||
|     width: 33%; | ||||
|     height: 38px; | ||||
|     float: right; | ||||
|     img { | ||||
|       cursor: pointer; | ||||
|       width:100%;max-width:100px; height:auto; | ||||
|       vertical-align: middle; | ||||
|     } | ||||
|   } | ||||
|   // 元素 | ||||
|   width: inherit; | ||||
|   height: inherit; | ||||
|   min-width: 1080px; | ||||
|   min-height: 620px; | ||||
|   background-color: $containerBgColor; | ||||
|   background-image: url($containerBgImage); | ||||
|   background-size: cover; | ||||
|   // 定位 | ||||
|   position: relative; | ||||
|   display: flex; | ||||
|   justify-content: center; | ||||
|   align-items: center; | ||||
|   // 文字 | ||||
|   font-size: 14px; | ||||
|   font-family: Microsoft YaHei; | ||||
|   font-weight: 400; | ||||
|   .logo { | ||||
|     // 元素 | ||||
|     width: $logoWidth; | ||||
|     height: $logoHeight; | ||||
|     // background-image: url($logoImage); | ||||
|     // background-size: contain; | ||||
|     // 定位 | ||||
|     position: absolute; | ||||
|     top: 50px; | ||||
|     left: 50%; | ||||
|     margin-left: -$logoWidth/2; | ||||
|   } | ||||
|   .content { | ||||
|     // 元素 | ||||
|     width: $contentWidth; | ||||
|     height: $contentHeight; | ||||
|     background-color: #ffffff; | ||||
|     box-shadow: 0px 16px 40px rgba(0, 0, 0, 0.07); | ||||
|     border-radius: 20px; | ||||
|     // 定位 | ||||
|     position: relative; | ||||
|     .pic { | ||||
|       // 元素 | ||||
|       width: $picWidth; | ||||
|       height: $picHeight; | ||||
|       background-image: url($picImage); | ||||
|       background-repeat: no-repeat; | ||||
|       background-size: cover; | ||||
|       border-radius: 20px 0 0 20px; | ||||
|       // 定位 | ||||
|       position: absolute; | ||||
|       top: 0; | ||||
|       left: 0; | ||||
|     } | ||||
|     .field { | ||||
|       width: $fieldWidth; | ||||
|       height: $fieldHeight; | ||||
|       // 定位 | ||||
|       position: absolute; | ||||
|       top: 0; | ||||
|       left: $picWidth; | ||||
|       display:flex; | ||||
|       justify-content: center; | ||||
|       align-items: center; | ||||
|       .pc-title{ width: 100%; clear: both;} | ||||
|       .mobile-title, | ||||
|       .mobile-switch { | ||||
|         display: none; | ||||
|       } | ||||
|       .form { | ||||
|         box-sizing: border-box; | ||||
|         width: $formWidth; | ||||
|         // - - - tab | ||||
|         :deep(.el-tabs__content) { | ||||
|           padding: 20px 0 0; | ||||
|         } | ||||
|         :deep(.el-tabs__item) { | ||||
|           // 元素 | ||||
|           width: $tabWidth; | ||||
|           height: $rowHeight; | ||||
|           padding: 0; | ||||
|           // 文字 | ||||
|           line-height: $rowHeight; | ||||
|           color: #666666; | ||||
|         } | ||||
|         :deep(.el-tabs__item.is-active) { | ||||
|           font-weight: bold; | ||||
|           color: #2F53EB; | ||||
|         } | ||||
|         :deep(.el-tabs__active-bar) { | ||||
|           height: 3px; | ||||
|           border-radius: 2px; | ||||
|         } | ||||
|         // - - - input | ||||
|         :deep(.el-input__inner) { | ||||
|           // 元素 | ||||
|           width: 100%; | ||||
|           height: $rowHeight; | ||||
|           background: #f5f5f5; | ||||
|           border: 0; | ||||
|           border-radius: 28px; | ||||
|           // 文字 | ||||
|           text-align: center; | ||||
|           line-height: 19px; | ||||
|           color: #262626; | ||||
|         } | ||||
|         .code:deep(.el-input__inner) { | ||||
|           padding: 0 24px; | ||||
|           // 文字 | ||||
|           text-align: left; | ||||
|         } | ||||
|         :deep(.el-input__inner::-webkit-input-placeholder) { /* WebKit browsers */ | ||||
|           font-weight: 400; | ||||
|           color: #8C8C8C; | ||||
|         } | ||||
|         :deep(.el-input__inner:-moz-placeholder) { /* Mozilla Firefox 4 to 18 */ | ||||
|           font-weight: 400; | ||||
|           color: #8C8C8C; | ||||
|         } | ||||
|         :deep(.el-input__inner::-moz-placeholder) { /* Mozilla Firefox 19+ */ | ||||
|           font-weight: 400; | ||||
|           color: #8C8C8C; | ||||
|           opacity:1; | ||||
|         } | ||||
|         :deep(.el-input__inner:-ms-input-placeholder) { /* Internet Explorer 10+ */ | ||||
|           font-weight: 400; | ||||
|           color: #8C8C8C !important; | ||||
|         } | ||||
|         :deep(.el-form-item) { | ||||
|           position: relative; | ||||
|           .button-code { | ||||
|             // 元素 | ||||
|             height: $rowHeight; | ||||
|             box-sizing: border-box; | ||||
|             // 定位 | ||||
|             position: absolute; | ||||
|             top: 0; | ||||
|             right: 20px; | ||||
|             z-index: 1; | ||||
|             // 文字 | ||||
|             line-height: 20px; | ||||
|             font-size: 14px; | ||||
|             font-family: PingFang SC; | ||||
|             font-weight: 400; | ||||
|             color: #2F53EB; | ||||
|             span { | ||||
|               padding-left: 15px; | ||||
|               border-left: 2px solid #D9D9D9; | ||||
|             } | ||||
|           } | ||||
|         } | ||||
|         :deep(.el-form-item__error) { | ||||
|           padding-left: 24px; | ||||
|         } | ||||
|         .button { | ||||
|           width: 100%; | ||||
|           height: $buttonHeight; | ||||
|           background: rgba(24, 144, 255, 0.2); | ||||
|           border: 0; | ||||
|           border-radius: 24px; | ||||
|           margin-bottom: 20px; | ||||
|           // 文字 | ||||
|           line-height: 26px; | ||||
|           font-size: 20px; | ||||
|           color: #FFFFFF; | ||||
|         } | ||||
|         .button-active { | ||||
|           background: #2F53EB; | ||||
|           box-shadow: 0px 2px 8px rgba(0, 80, 184, 0.2); | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|   } | ||||
|   .footer { | ||||
|     // 元素 | ||||
|     height: 16px; | ||||
|     line-height: 16px; | ||||
|     font-size: 12px; | ||||
|     color: #8c8c8c; | ||||
|     // 定位 | ||||
|     position: absolute; | ||||
|     bottom: 30px; | ||||
|     a, | ||||
|     a:hover, | ||||
|     a:active { | ||||
|       color: inherit; | ||||
|       text-decoration: none; | ||||
|     } | ||||
|   } | ||||
| 	.login-code { | ||||
| 		width: 33%; | ||||
| 		height: 38px; | ||||
| 		float: right; | ||||
| 		img { | ||||
| 			cursor: pointer; | ||||
| 			width: 100%; | ||||
| 			max-width: 100px; | ||||
| 			height: auto; | ||||
| 			vertical-align: middle; | ||||
| 		} | ||||
| 	} | ||||
| 	// 元素 | ||||
| 	width: inherit; | ||||
| 	height: inherit; | ||||
| 	min-width: 1080px; | ||||
| 	min-height: 620px; | ||||
| 	background-color: $containerBgColor; | ||||
| 	// background-image: url($containerBgImage); | ||||
| 	background-size: cover; | ||||
| 	// 定位 | ||||
| 	position: relative; | ||||
| 	display: flex; | ||||
| 	justify-content: center; | ||||
| 	align-items: center; | ||||
| 	// 文字 | ||||
| 	font-size: 14px; | ||||
| 	font-family: Microsoft YaHei; | ||||
| 	font-weight: 400; | ||||
| 	.logo { | ||||
| 		// 元素 | ||||
| 		width: $logoWidth; | ||||
| 		height: $logoHeight; | ||||
| 		// background-image: url($logoImage); | ||||
| 		// background-size: contain; | ||||
| 		// 定位 | ||||
| 		position: absolute; | ||||
| 		top: 50px; | ||||
| 		left: 50%; | ||||
| 		margin-left: -$logoWidth/2; | ||||
| 	} | ||||
| 	.content { | ||||
| 		// 元素 | ||||
| 		// width: $contentWidth; | ||||
| 		// height: $contentHeight; | ||||
| 		width: 100%; | ||||
| 		height: 100%; | ||||
| 		background-color: #ffffff; | ||||
| 		// box-shadow: 0px 16px 40px rgba(0, 0, 0, 0.07); | ||||
| 		// border-radius: 20px; | ||||
| 		// 定位 | ||||
| 		position: relative; | ||||
| 		display: flex; | ||||
|  | ||||
| 		.pic { | ||||
| 			// 元素 | ||||
| 			width: $picWidth; | ||||
| 			height: $picHeight; | ||||
| 			background-image: url($picImage); | ||||
| 			background-repeat: no-repeat; | ||||
| 			background-size: 100% 100%; | ||||
| 			background-position: 0 0; | ||||
| 			position: relative; | ||||
|  | ||||
| 			&::after { | ||||
|         content: ''; | ||||
| 				position: absolute; | ||||
| 				top: 0; | ||||
| 				left: 0; | ||||
| 				width: 100%; | ||||
| 				height: 100%; | ||||
|         // background: #f003; | ||||
|         display: inline-block; | ||||
| 			} | ||||
| 		} | ||||
| 		.field { | ||||
| 			// background: #ccc3; | ||||
| 			position: relative; | ||||
| 			padding-top: 196px; | ||||
| 			flex: 1; | ||||
| 			display: flex; | ||||
| 			flex-direction: column; | ||||
| 			// justify-content: center; | ||||
| 			align-items: center; | ||||
| 			.pc-title { | ||||
| 				width: 100%; | ||||
| 				text-align: center; | ||||
| 				clear: both; | ||||
| 				position: relative; | ||||
| 				top: -36px; | ||||
|  | ||||
| 				// h3.title { | ||||
| 				// 	position: relative; | ||||
|  | ||||
| 				// 	&::before { | ||||
| 				// 		content: ''; | ||||
| 				// 		background: url($cnbmLogo) 100% / 100% no-repeat; | ||||
| 				// 		height: 48px; | ||||
| 				// 		width: 48px; | ||||
| 				// 		position: absolute; | ||||
| 				// 		left: 0px; | ||||
| 				// 		top: 4px; | ||||
| 				// 		display: inline-block; | ||||
| 				// 	} | ||||
| 				// } | ||||
| 			} | ||||
| 			.mobile-title, | ||||
| 			.mobile-switch { | ||||
| 				display: none; | ||||
| 			} | ||||
| 			.form { | ||||
| 				margin-top: 32px; | ||||
| 				box-sizing: border-box; | ||||
| 				// width: $formWidth; | ||||
| 				width: 100%; | ||||
| 				// - - - tab | ||||
| 				:deep(.el-tabs__nav) { | ||||
| 					// background: #f0f3; | ||||
| 				} | ||||
| 				:deep(.el-tabs__content) { | ||||
| 					padding: 20px 0 0; | ||||
| 				} | ||||
| 				:deep(.el-tabs__item) { | ||||
| 					user-select: none; | ||||
| 					// 元素 | ||||
| 					width: $tabWidth; | ||||
| 					height: $rowHeight; | ||||
| 					padding: 0; | ||||
| 					// 文字 | ||||
| 					line-height: $rowHeight; | ||||
| 					color: #666666; | ||||
| 					font-size: 18px; | ||||
| 					font-weight: 400; | ||||
| 					text-align: center; | ||||
| 				} | ||||
| 				:deep(.el-tabs__item.is-active) { | ||||
| 					font-weight: 500; | ||||
| 					color: #2f53eb; | ||||
| 				} | ||||
| 				:deep(.el-tabs__active-bar) { | ||||
| 					height: 3px; | ||||
| 					border-radius: 2px; | ||||
| 				} | ||||
| 				// - - - input | ||||
| 				:deep(.el-input__inner) { | ||||
| 					// 元素 | ||||
| 					width: 100%; | ||||
| 					height: $rowHeight; | ||||
| 					background: #f5f5f5; | ||||
| 					border: 0; | ||||
| 					border-radius: 28px; | ||||
| 					// 文字 | ||||
| 					text-align: center; | ||||
| 					line-height: 19px; | ||||
| 					color: #262626; | ||||
| 				} | ||||
| 				.code:deep(.el-input__inner) { | ||||
| 					padding: 0 24px; | ||||
| 					// 文字 | ||||
| 					text-align: left; | ||||
| 				} | ||||
| 				:deep(.el-input__inner::-webkit-input-placeholder) { | ||||
| 					/* WebKit browsers */ | ||||
| 					font-weight: 400; | ||||
| 					color: #8c8c8c; | ||||
| 				} | ||||
| 				:deep(.el-input__inner:-moz-placeholder) { | ||||
| 					/* Mozilla Firefox 4 to 18 */ | ||||
| 					font-weight: 400; | ||||
| 					color: #8c8c8c; | ||||
| 				} | ||||
| 				:deep(.el-input__inner::-moz-placeholder) { | ||||
| 					/* Mozilla Firefox 19+ */ | ||||
| 					font-weight: 400; | ||||
| 					color: #8c8c8c; | ||||
| 					opacity: 1; | ||||
| 				} | ||||
| 				:deep(.el-input__inner:-ms-input-placeholder) { | ||||
| 					/* Internet Explorer 10+ */ | ||||
| 					font-weight: 400; | ||||
| 					color: #8c8c8c !important; | ||||
| 				} | ||||
| 				:deep(.el-form-item) { | ||||
| 					position: relative; | ||||
| 					.button-code { | ||||
| 						// 元素 | ||||
| 						height: $rowHeight; | ||||
| 						box-sizing: border-box; | ||||
| 						// 定位 | ||||
| 						position: absolute; | ||||
| 						top: 0; | ||||
| 						right: 20px; | ||||
| 						z-index: 1; | ||||
| 						// 文字 | ||||
| 						line-height: 20px; | ||||
| 						font-size: 14px; | ||||
| 						font-family: PingFang SC; | ||||
| 						font-weight: 400; | ||||
| 						color: #2f53eb; | ||||
| 						span { | ||||
| 							padding-left: 15px; | ||||
| 							border-left: 2px solid #d9d9d9; | ||||
| 						} | ||||
| 					} | ||||
| 				} | ||||
| 				:deep(.el-form-item__error) { | ||||
| 					padding-left: 24px; | ||||
| 				} | ||||
| 				.button { | ||||
| 					width: 100%; | ||||
| 					height: $buttonHeight; | ||||
| 					background: rgba(24, 144, 255, 0.2); | ||||
| 					border: 0; | ||||
| 					border-radius: 24px; | ||||
| 					margin-bottom: 20px; | ||||
| 					// 文字 | ||||
| 					line-height: 26px; | ||||
| 					font-size: 20px; | ||||
| 					color: #ffffff; | ||||
| 				} | ||||
| 				.button-active { | ||||
| 					background: #2f53eb; | ||||
| 					box-shadow: 0px 2px 8px rgba(0, 80, 184, 0.2); | ||||
| 				} | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	.login-form { | ||||
| 		* { | ||||
| 			user-select: none; | ||||
| 		} | ||||
| 		// - - - input | ||||
| 		:deep(.el-input__inner) { | ||||
| 			// 元素 | ||||
| 			width: 420px; | ||||
| 			height: 66px; | ||||
| 			color: #262626; | ||||
| 			font-size: 18px; | ||||
| 		} | ||||
| 		:deep(.el-checkbox__label) { | ||||
| 			font-size: 18px; | ||||
| 			line-height: 14px; | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	.footer { | ||||
| 		user-select: none; | ||||
| 		// 元素 | ||||
| 		height: 16px; | ||||
| 		line-height: 16px; | ||||
| 		font-size: 12px; | ||||
| 		color: #8c8c8c; | ||||
| 		// 定位 | ||||
| 		position: absolute; | ||||
| 		bottom: 30px; | ||||
| 		a, | ||||
| 		a:hover, | ||||
| 		a:active { | ||||
| 			color: inherit; | ||||
| 			text-decoration: none; | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
|  | ||||
| // - - - - - PC 最小尺寸设置 | ||||
| @media screen and (min-width: 599px) and (max-width: 1366px) { | ||||
|   .container { | ||||
|     .content { | ||||
|       width: 710px; | ||||
|       height: 397px; | ||||
|       .pic { | ||||
|         width: 314px; | ||||
|       } | ||||
|       .field { | ||||
|         width: calc(710px - 314px); | ||||
|         left: 314px; | ||||
|         .form { | ||||
|           width: 320px; | ||||
|           :deep(.el-input__inner) { | ||||
|             width: 320px; | ||||
|             height: 56px; | ||||
|           } | ||||
|           .button { | ||||
|             height: 50px; | ||||
|           } | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| } | ||||
| 	.container { | ||||
| 		min-width: 599px; | ||||
| 		.content { | ||||
| 			// width: 710px; | ||||
| 			// height: 397px; | ||||
| 			width: 100%; | ||||
| 			height: 100%; | ||||
| 			.pic { | ||||
| 				// width: 314px; | ||||
| 				display: none; | ||||
| 			} | ||||
| 			.field { | ||||
| 				// width: calc(710px - 314px); | ||||
| 				// left: 314px; | ||||
| 				// justify-content: center; | ||||
| 				width: 100%; | ||||
|  | ||||
| 				.pc-title { | ||||
| 					h3 { | ||||
| 						font-size: 2.4rem !important; | ||||
| 					} | ||||
| 				} | ||||
|  | ||||
| 				.form { | ||||
| 					// width: 320px; | ||||
| 					:deep(.el-input__inner) { | ||||
| 						width: 320px; | ||||
| 						height: 56px; | ||||
| 					} | ||||
| 					.button { | ||||
| 						height: 50px; | ||||
| 					} | ||||
| 				} | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
|  | ||||
| /* ===== MOBILE DESIGN ===== */ | ||||
| $mobileW: 375; | ||||
| @@ -273,115 +357,142 @@ $mobileButtonH: 48; | ||||
| $mobileContainerBgImage: '../assets/images/bg-mobile.png'; | ||||
| // container-content | ||||
| $mobileContentWidth: round($mobileContentW / $mobileW * 100) * 1vw; | ||||
| $mobileContentHeight: round($mobileContentH / $mobileW * 100) / 100 * $mobileContentWidth; | ||||
| $mobileContentHeight: round($mobileContentH / $mobileW * 100) / 100 * | ||||
| 	$mobileContentWidth; | ||||
| // container-content-field-form | ||||
| $mobileFormWidth: round($mobileFormW / $mobileW *100) * 1vw; | ||||
| $mobileFormWidth: round($mobileFormW / $mobileW * 100) * 1vw; | ||||
| $mobileRowHeight: $mobileRowH * 1px; | ||||
| $mobileButtonHeight: $mobileButtonH * 1px; | ||||
| $iconBgImage: '../assets/images/icon.png'; | ||||
|  | ||||
| // - - - - - 移动端设置 | ||||
| @media screen and (max-width: 599px) { | ||||
|   .container { | ||||
|     // 元素 | ||||
|     background-image: url($mobileContainerBgImage); | ||||
|     min-width: 280px; | ||||
|     min-height: 568px; | ||||
|     // 文字 | ||||
|     font-size: 17px; | ||||
|     font-family: PingFang SC; | ||||
|     font-weight: bold; | ||||
|     .logo { | ||||
|       display: none; | ||||
|     } | ||||
| 	.container { | ||||
| 		// 元素 | ||||
| 		background-image: url($mobileContainerBgImage); | ||||
| 		min-width: 280px; | ||||
| 		min-height: 568px; | ||||
| 		// 文字 | ||||
| 		font-size: 14px; | ||||
| 		font-family: PingFang SC; | ||||
| 		font-weight: bold; | ||||
| 		.logo { | ||||
| 			display: none; | ||||
| 		} | ||||
|  | ||||
|     .content { | ||||
|       // 元素 | ||||
|       width: $mobileContentWidth; | ||||
|       height: $mobileContentHeight; | ||||
|       min-width: 250px; | ||||
|       min-height: 340px; | ||||
|       // 定位 | ||||
|       display: flex; | ||||
|       justify-content: center; | ||||
|       align-items: center; | ||||
|       .pic { | ||||
|         display: none; | ||||
|       } | ||||
|       .field { | ||||
|         // 元素 | ||||
|         width: inherit; | ||||
|         min-height: inherit; | ||||
|         // 定位 | ||||
|         left: 0; | ||||
|         display: flex; | ||||
|         flex-direction: column; | ||||
|         .mobile-title { | ||||
|           // 元素 | ||||
|           margin: 0 0 20px; | ||||
|           display: block; | ||||
|         } | ||||
|         .form { | ||||
|           width: $mobileFormWidth; | ||||
|           // - - - tab | ||||
|           :deep(.el-tabs__header) { | ||||
|             display: none; | ||||
|           } | ||||
|           :deep(.el-tabs__content) { | ||||
|             padding: 0; | ||||
|           } | ||||
|           // - - - input | ||||
|           :deep(.el-input__inner) { | ||||
|             height: $mobileRowHeight; | ||||
|             line-height: 24px; | ||||
|             // 文字 | ||||
|             text-align: center; | ||||
|             color: #262626; | ||||
|           } | ||||
|           :deep(.el-form-item) { | ||||
|             .button-code { | ||||
|               // 元素 | ||||
|               height: $mobileRowHeight; | ||||
|             } | ||||
|           } | ||||
|           .button { | ||||
|             height: $mobileButtonHeight; | ||||
|             line-height: 24px; | ||||
|             color: #FFFFFF; | ||||
|           } | ||||
|         } | ||||
|         .mobile-switch { | ||||
|           display: block; | ||||
|           line-height: 20px; | ||||
|           font-size: 14px; | ||||
|           font-weight: 400; | ||||
|           color: #595959; | ||||
| 		.pc-title { | ||||
| 			display: none; | ||||
| 		} | ||||
|  | ||||
| 		.content { | ||||
| 			// 元素 | ||||
| 			width: $mobileContentWidth; | ||||
| 			height: $mobileContentHeight; | ||||
| 			min-width: 250px; | ||||
| 			min-height: 340px; | ||||
| 			// 定位 | ||||
| 			display: flex; | ||||
| 			justify-content: center; | ||||
| 			align-items: center; | ||||
| 			.pic { | ||||
| 				display: none; | ||||
| 			} | ||||
| 			.field { | ||||
|         padding: 0; | ||||
| 				// 元素 | ||||
| 				width: inherit; | ||||
| 				min-height: inherit; | ||||
| 				// 定位 | ||||
| 				left: 0; | ||||
| 				display: flex; | ||||
| 				flex-direction: column; | ||||
|  | ||||
| 				.mobile-title { | ||||
| 					// 元素 | ||||
| 					margin: 0; | ||||
| 					display: block; | ||||
| 				} | ||||
|  | ||||
| 				.form { | ||||
|           margin: 0; | ||||
|           .icon { | ||||
|             width: 14px; | ||||
|             height: 14px; | ||||
|             display: inline-block; | ||||
|             background-image: url($iconBgImage); | ||||
|             background-size: cover; | ||||
|           } | ||||
|         } | ||||
|         .mobile-switch:hover { | ||||
|           cursor: pointer; | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|     .footer { | ||||
|       // 元素 | ||||
|       font-size: 12px; | ||||
|       font-family: PingFang SC; | ||||
|       font-weight: 400; | ||||
|       line-height: 17px; | ||||
|       color: #333333; | ||||
|       opacity: 0.6; | ||||
|       // 定位 | ||||
|       position: absolute; | ||||
|       bottom: 20px; | ||||
|     } | ||||
|   } | ||||
| 					width: $mobileFormWidth; | ||||
| 					// - - - tab | ||||
| 					:deep(.el-tabs__header) { | ||||
| 						display: none; | ||||
| 					} | ||||
| 					:deep(.el-tabs__content) { | ||||
| 						padding: 0; | ||||
| 					} | ||||
| 					// - - - input | ||||
| 					:deep(.el-input__inner) { | ||||
| 						height: $mobileRowHeight; | ||||
| 						line-height: 24px; | ||||
| 						// 文字 | ||||
| 						text-align: center; | ||||
| 						color: #262626; | ||||
| 					} | ||||
| 					:deep(.el-form-item) { | ||||
| 						.button-code { | ||||
| 							// 元素 | ||||
| 							height: $mobileRowHeight; | ||||
| 						} | ||||
| 					} | ||||
| 					.button { | ||||
| 						height: $mobileButtonHeight; | ||||
| 						line-height: 24px; | ||||
| 						color: #ffffff; | ||||
| 					} | ||||
| 				} | ||||
|  | ||||
| 				.login-form { | ||||
| 					:deep(.el-input__inner) { | ||||
| 						height: $mobileRowHeight; | ||||
| 						line-height: 24px; | ||||
| 						// 文字 | ||||
| 						text-align: center; | ||||
| 						color: #262626; | ||||
| 					} | ||||
|  | ||||
|           :deep(#button-form-item) { | ||||
|             margin: 0 !important; | ||||
| 						button { | ||||
| 							// 元素 | ||||
| 							height: $mobileRowHeight; | ||||
| 						} | ||||
| 					} | ||||
| 				} | ||||
| 				.mobile-switch { | ||||
| 					display: block; | ||||
| 					line-height: 20px; | ||||
| 					font-size: 14px; | ||||
| 					font-weight: 400; | ||||
| 					color: #595959; | ||||
| 					margin: 0; | ||||
| 					.icon { | ||||
| 						width: 14px; | ||||
| 						height: 14px; | ||||
| 						display: inline-block; | ||||
| 						background-image: url($iconBgImage); | ||||
| 						background-size: cover; | ||||
| 					} | ||||
| 				} | ||||
| 				.mobile-switch:hover { | ||||
| 					cursor: pointer; | ||||
| 				} | ||||
| 			} | ||||
| 		} | ||||
|  | ||||
| 		.footer { | ||||
| 			// 元素 | ||||
| 			font-size: 12px; | ||||
| 			font-family: PingFang SC; | ||||
| 			font-weight: 400; | ||||
| 			line-height: 17px; | ||||
| 			color: #333333; | ||||
| 			opacity: 0.6; | ||||
| 			// 定位 | ||||
| 			// position: absolute; | ||||
| 			bottom: -32px; | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
|   | ||||
| @@ -21,13 +21,11 @@ | ||||
| 						v-model="form[col.prop]" | ||||
| 						@change="$emit('update', form)" | ||||
| 						:placeholder="`请输入${col.label}`" | ||||
| 						:disabled="disabled" | ||||
| 						v-bind="col.bind" /> | ||||
| 					<el-input | ||||
| 						v-if="col.textarea" | ||||
| 						type="textarea" | ||||
| 						v-model="form[col.prop]" | ||||
| 						:disabled="disabled" | ||||
| 						@change="$emit('update', form)" | ||||
| 						:placeholder="`请输入${col.label}`" | ||||
| 						v-bind="col.bind" /> | ||||
| @@ -35,7 +33,6 @@ | ||||
| 						v-if="col.select" | ||||
| 						v-model="form[col.prop]" | ||||
| 						:placeholder="`请选择${col.label}`" | ||||
| 						:disabled="disabled" | ||||
| 						@change="$emit('update', form)" | ||||
| 						v-bind="col.bind"> | ||||
| 						<el-option | ||||
| @@ -48,23 +45,18 @@ | ||||
| 						v-if="col.datetime" | ||||
| 						v-model="form[col.prop]" | ||||
| 						type="datetime" | ||||
| 						:disabled="disabled" | ||||
| 						:placeholder="`请选择${col.label}`" | ||||
| 						value-format="timestamp" | ||||
| 						@change="$emit('update', form)" | ||||
| 						v-bind="col.bind"></el-date-picker> | ||||
| 					<el-switch | ||||
| 						v-if="col.switch" | ||||
| 						v-model="form[col.prop]" | ||||
| 						:disabled="disabled" | ||||
| 						active-color="#0b58ff" | ||||
| 						inactive-color="#e1e1e1" | ||||
| 						@change="$emit('update', form)" | ||||
| 						v-bind="col.bind"></el-switch> | ||||
| 					<component | ||||
| 						v-if="col.subcomponent" | ||||
| 						:key="col.key" | ||||
| 						:disabled="disabled" | ||||
| 						:is="col.subcomponent" | ||||
| 						:inlineStyle="col.style"></component> | ||||
|  | ||||
| @@ -87,7 +79,6 @@ | ||||
| 							:headers="uploadHeaders" | ||||
| 							:show-file-list="false" | ||||
| 							icon="el-icon-upload2" | ||||
| 							:disabled="disabled" | ||||
| 							:before-upload="beforeUpload" | ||||
| 							:on-success="handleUploadSuccess" | ||||
| 							v-bind="col.bind"> | ||||
| @@ -107,7 +98,7 @@ | ||||
| 							v-for="file in form[col.prop] || []" | ||||
| 							:file="file" | ||||
| 							:key="file.fileUrl" | ||||
| 							@delete="!disabled && handleDeleteFile(file)" /> | ||||
| 							@delete="handleDeleteFile(file)" /> | ||||
| 					</div> | ||||
| 				</el-form-item> | ||||
| 			</el-col> | ||||
| @@ -118,7 +109,6 @@ | ||||
| <script> | ||||
| import { getAccessToken } from '@/utils/auth'; | ||||
| import tupleImg from '@/assets/images/tuple.png'; | ||||
| import cache from '@/utils/cache'; | ||||
|  | ||||
| /** | ||||
|  * 找到最长的label | ||||
| @@ -200,7 +190,7 @@ export default { | ||||
| 			type: Boolean, | ||||
| 			default: false, | ||||
| 		}, | ||||
| 		hasFiles: { | ||||
| 		hasFile: { | ||||
| 			type: Boolean, | ||||
| 			default: false, | ||||
| 		}, | ||||
| @@ -246,7 +236,7 @@ export default { | ||||
| 		dataForm: { | ||||
| 			handler(val) { | ||||
| 				this.form = JSON.parse(JSON.stringify(val)); | ||||
| 				if (this.hasFiles) { | ||||
| 				if (this.hasFile) { | ||||
| 					this.form.files = this.form.files ?? []; | ||||
| 				} | ||||
| 			}, | ||||
| @@ -286,6 +276,7 @@ export default { | ||||
| 					} else if (opt.url) { | ||||
| 						// 如果有 depends,则暂时先不获取,注册一个watcher | ||||
| 						if (opt.depends) { | ||||
| 							console.log('[handleOptions] setting watch'); | ||||
| 							this.$watch( | ||||
| 								() => this.form[opt.depends], | ||||
| 								(id) => { | ||||
| @@ -308,7 +299,7 @@ export default { | ||||
| 									}); | ||||
| 								}, | ||||
| 								{ | ||||
| 									immediate: false, | ||||
| 									immediate: true, | ||||
| 								} | ||||
| 							); | ||||
| 							return; | ||||
| @@ -326,11 +317,6 @@ export default { | ||||
| 										'list' in response.data | ||||
| 											? response.data.list | ||||
| 											: response.data; | ||||
|  | ||||
| 									if (opt.cache) { | ||||
| 										cache.store(opt.cache, list); | ||||
| 									} | ||||
|  | ||||
| 									this.$set( | ||||
| 										this.optionListOf, | ||||
| 										opt.prop, | ||||
|   | ||||
| @@ -71,9 +71,7 @@ import DocAlert from '@/components/DocAlert'; | ||||
| // 头部标签插件 | ||||
| import VueMeta from 'vue-meta'; | ||||
| import CodeBrickZj from 'code-brick-zj'; | ||||
| import { hiPrintPlugin,disAutoConnect } from 'vue-plugin-hiprint' | ||||
| disAutoConnect(); | ||||
| Vue.use(hiPrintPlugin) | ||||
|  | ||||
| Vue.use(CodeBrickZj) | ||||
| Vue.use(directive); | ||||
| Vue.use(plugins); | ||||
|   | ||||
| @@ -28,59 +28,10 @@ export default { | ||||
| 			// tableBtn: [], // 占位 | ||||
| 			// searchBarFormConfig: [], // 占位 | ||||
| 			// // 弹窗表单配置 | ||||
| 			// dialogFormConfig: [], //  | ||||
| 			updateUrl: '', | ||||
| 			addUrl: '', | ||||
| 			pageUrl: '', | ||||
| 			infoUrl: '', | ||||
| 			basePath: '', | ||||
| 			form: {} | ||||
| 			// dialogFormConfig: [], // 占位 | ||||
| 		}; | ||||
| 	}, | ||||
| 	computed: { | ||||
| 		addPath() { | ||||
| 			return this.basePath + '/create' | ||||
| 		}, | ||||
| 		updatePath() { | ||||
| 			return this.basePath + '/update' | ||||
| 		}, | ||||
| 		deletePath() { | ||||
| 			return this.basePath + '/delete' | ||||
| 		}, | ||||
| 		infoPath() { | ||||
| 			return this.basePath + '/get' | ||||
| 		}, | ||||
| 		pagePath() { | ||||
| 			return this.basePath + '/page' | ||||
| 		} | ||||
| 	}, | ||||
| 	methods: { | ||||
| 		// utils | ||||
| 		http(url, method, payload) { | ||||
| 			return this.$axios({ | ||||
| 				url, | ||||
| 				method, | ||||
| 				params: method === 'get' ? payload : null, | ||||
| 				data: method !== 'get' ? payload : null, | ||||
| 			}) | ||||
| 		}, | ||||
| 		put(payload) { | ||||
| 			return this.http(this.updateUrl == '' ? this.updatePath : this.updateUrl, 'put', payload); | ||||
| 		}, | ||||
| 		post(payload) { | ||||
| 			return this.http(this.addUrl == '' ? this.addPath : this.addUrl, 'post', payload); | ||||
| 		}, | ||||
| 		recv(payload) { | ||||
| 			return this.http(this.pageUrl == '' ? this.pagePath : this.pageUrl, 'get', payload); | ||||
| 		}, | ||||
| 		info(payload) { | ||||
| 			return this.http(this.infoUrl == '' ? this.infoPath : this.infoUrl, 'get', payload); | ||||
| 		}, | ||||
| 		del(payload) { | ||||
| 			return this.http(this.deleteUrl == '' ? this.deletePath : this.deleteUrl, 'delete', payload); | ||||
| 		}, | ||||
|  | ||||
|  | ||||
| 		// 过滤后端传回的详情数据 | ||||
| 		filterData(data, keys) { | ||||
| 			const obj = {}; | ||||
|   | ||||
| @@ -72,7 +72,7 @@ export const constantRoutes = [ | ||||
|   { | ||||
|     path: '/', | ||||
|     component: Layout, | ||||
|     // redirect: 'core/base/factory', | ||||
|     redirect: 'core/base/factory', | ||||
|     // children: [{ | ||||
|     //   path: 'index', | ||||
|     //   redirect: 'core/base/factory', | ||||
|   | ||||
| @@ -180,7 +180,6 @@ input, textarea{ | ||||
| // 抽屉head区域---start | ||||
| .el-drawer__header { | ||||
|   padding-bottom: 20px; | ||||
|   padding-left: 30px; | ||||
|   margin-bottom: 23px; | ||||
|   font-size: 20px; | ||||
|   font-weight: 500; | ||||
|   | ||||
| @@ -1,53 +0,0 @@ | ||||
| let timers = []; | ||||
|  | ||||
| export default { | ||||
|  | ||||
|     exists(key) { | ||||
|         const _ = localStorage.getItem('stored_keys'); | ||||
|         return _ ? _.split(',')?.indexOf(key) != -1 : false; | ||||
|     }, | ||||
|  | ||||
|     store(key, value, duration = null) { | ||||
|         if (!localStorage.getItem('stored_keys')) localStorage.setItem('stored_keys', key); | ||||
|         else localStorage.setItem('stored_keys', localStorage.getItem('stored_keys') + ',' + key); | ||||
|  | ||||
|         localStorage.setItem(key, JSON.stringify(value)); | ||||
|         console.log('store duration', duration) | ||||
|         if (duration) { | ||||
|             if (timers[key]) clearTimeout(timers[key]); | ||||
|             timers[key] = setTimeout(() => { | ||||
|                 console.log("clear cache", key) | ||||
|                 this.clear([key]); | ||||
|             }, duration * 1000); | ||||
|         } | ||||
|     }, | ||||
|  | ||||
|     /** | ||||
|      *  | ||||
|      * @param {*} key  | ||||
|      * @param {*} cb  | ||||
|      * @param {*} param2 force 强制更新,调用cb | ||||
|      * @returns  | ||||
|      */ | ||||
|     async getList(key, cb = null, { force = false, duration = null } = {}) { | ||||
|         if (this.exists(key) && !force) { | ||||
|             return JSON.parse(localStorage.getItem(key)) | ||||
|         } else { | ||||
|             const list = await cb(); | ||||
|             this.store(key, list, duration); | ||||
|             return list; | ||||
|         } | ||||
|     }, | ||||
|  | ||||
|     clear(keys) { | ||||
|         if (keys && keys.length) { | ||||
|             let stored_keys = localStorage.getItem('stored_keys').split(','); | ||||
|             keys.forEach((key) => { | ||||
|                 stored_keys = stored_keys.filter((item) => item != key); | ||||
|             }); | ||||
|             localStorage.setItem('stored_keys', stored_keys); | ||||
|             return; | ||||
|         } | ||||
|         localStorage.removeItem('stored_keys'); | ||||
|     }, | ||||
| } | ||||
| @@ -89,21 +89,13 @@ export const DICT_TYPE = { | ||||
|  | ||||
|   // ============== ENERGY - 能源模块 ============= | ||||
|   ENERGY_UNIT: 'energy_unit', | ||||
|    | ||||
|   // ============== ENERGY - 能源模块 ============= | ||||
|   EQU_ALARM_LEVEL: 'equ_alarm_level', | ||||
|   MONITOR_INDEX_TYPE: 'monitor_index_type', | ||||
|   OBJECT_TYPE: 'object_type', | ||||
|   STATISTIC_TYPE: 'statistic_type', | ||||
|   TIME_DIM: 'time_dim', | ||||
|  | ||||
|   // ============== ORDER - 订单模块 ============= | ||||
|   ORDER_STATUS: 'order_status', | ||||
|   ORDER_ORIGIN: 'order_Origin', | ||||
|   ORDER_PRIORITY: 'order_priority', | ||||
|   PACK_SPEC: 'pack_spec', | ||||
|    | ||||
|   // ============== EQUIPMENT - 设备模块 ============= | ||||
|   MAINTAIN_TYPE: 'maintain_type', | ||||
|   FAULT_LEVEL: 'fault-level', | ||||
|   TIME_DIM: 'time_dim' | ||||
| } | ||||
|  | ||||
| /** | ||||
|   | ||||
| @@ -217,7 +217,7 @@ export function getTime(type) { | ||||
| export function debounce(func, wait, immediate) { | ||||
|   let timeout, args, context, timestamp, result | ||||
|  | ||||
|   const later = function () { | ||||
|   const later = function() { | ||||
|     // 据上一次触发时间间隔 | ||||
|     const last = +new Date() - timestamp | ||||
|  | ||||
| @@ -234,7 +234,7 @@ export function debounce(func, wait, immediate) { | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   return function (...args) { | ||||
|   return function(...args) { | ||||
|     context = this | ||||
|     timestamp = +new Date() | ||||
|     const callNow = immediate && !timeout | ||||
| @@ -438,7 +438,3 @@ export function toCamelCase(str, upperCaseFirst) { | ||||
|  | ||||
|   return str; | ||||
| } | ||||
|  | ||||
| export function IdToName(targetId, source, prop = 'name') { | ||||
|   return source.find(item => item.id === targetId)?.[prop] | ||||
| } | ||||
| @@ -1,182 +0,0 @@ | ||||
| <template> | ||||
| 	<div class="app-container"> | ||||
| 		<search-bar | ||||
| 			:formConfigs="formConfig" | ||||
| 			ref="searchBarForm" | ||||
| 			@headBtnClick="buttonClick" /> | ||||
| 		<base-table | ||||
| 			v-loading="dataListLoading" | ||||
| 			:table-props="tableProps" | ||||
| 			:page="listQuery.pageNo" | ||||
| 			:limit="listQuery.pageSize" | ||||
| 			:table-data="tableData"> | ||||
| 			<method-btn | ||||
| 				v-if="tableBtn.length" | ||||
| 				slot="handleBtn" | ||||
| 				:width="120" | ||||
| 				label="操作" | ||||
| 				:method-list="tableBtn" | ||||
| 				@clickBtn="handleClick" /> | ||||
| 		</base-table> | ||||
| 		<pagination | ||||
| 			:limit.sync="listQuery.pageSize" | ||||
| 			:page.sync="listQuery.pageNo" | ||||
| 			:total="listQuery.total" | ||||
| 			@pagination="getDataList" /> | ||||
| 	</div> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import basicPage from '../../core/mixins/basic-page'; | ||||
| import { parseTime } from '../../core/mixins/code-filter'; | ||||
| import { | ||||
| 	getcoreAlarmLogPage | ||||
| } from '@/api/base/coreAlarmLog'; | ||||
| import {DICT_TYPE, getDictDatas} from "@/utils/dict"; | ||||
|  | ||||
| const tableProps = [ | ||||
| 	{ | ||||
| 		prop: 'alarmTime', | ||||
| 		label: '报警时间', | ||||
| 		filter: parseTime | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'alarmSource', | ||||
| 		label: '报警来源' | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'alarmType', | ||||
| 		label: '报警类型' | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'alarmGrade', | ||||
| 		label: '报警级别' | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'alarmReason', | ||||
| 		label: '报警原因' | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'alarmContent', | ||||
| 		label: '报警详细' | ||||
| 	} | ||||
| ]; | ||||
|  | ||||
| export default { | ||||
| 	mixins: [basicPage], | ||||
| 	data() { | ||||
| 		return { | ||||
| 			urlOptions: { | ||||
| 				getDataListURL: getcoreAlarmLogPage | ||||
| 			}, | ||||
| 			tableProps, | ||||
| 			tableBtn: [].filter((v)=>v), | ||||
| 			tableData: [], | ||||
| 			listQuery: { | ||||
|         pageSize: 10, | ||||
|         pageNo: 1, | ||||
|         total: 0, | ||||
| 				alarmSource: undefined, | ||||
| 				alarmGrade: undefined, | ||||
| 				alarmTime: [] | ||||
|       }, | ||||
| 			formConfig: [ | ||||
| 				{ | ||||
| 					type: 'input', | ||||
| 					label: '报警来源', | ||||
| 					placeholder: '报警来源', | ||||
| 					param: 'name', | ||||
| 				}, | ||||
| 				{ | ||||
|           type: 'datePicker', | ||||
|           label: '时间段', | ||||
|           dateType: 'datetimerange', | ||||
|           format: 'yyyy-MM-dd', | ||||
|           valueFormat: 'yyyy-MM-dd HH:mm:ss', | ||||
|           rangeSeparator: '-', | ||||
|           startPlaceholder: '开始时间', | ||||
|           endPlaceholder: '结束时间', | ||||
|           width: 350, | ||||
|           param: 'time' | ||||
|         }, | ||||
| 				{ | ||||
| 					type: 'select', | ||||
| 					label: '报警级别', | ||||
| 					placeholder: '请选择报警级别', | ||||
| 					param: 'alarmGrade', | ||||
| 					selectOptions: [], | ||||
| 					filterable: true, | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'button', | ||||
| 					btnName: '查询', | ||||
| 					name: 'search', | ||||
| 					color: 'primary', | ||||
| 				} | ||||
| 				// { | ||||
| 				// 	type: 'separate', | ||||
| 				// }, | ||||
| 				// { | ||||
| 				// 	type: this.$auth.hasPermi('base:core-alarm-log:create') ? 'button' : '', | ||||
| 				// 	btnName: '新增', | ||||
| 				// 	name: 'add', | ||||
| 				// 	color: 'success', | ||||
| 				// 	plain: true | ||||
| 				// }, | ||||
| 			], | ||||
| 		}; | ||||
| 	}, | ||||
| 	created() { | ||||
| 		this.getDict() | ||||
| 	}, | ||||
| 	methods: { | ||||
| 		// 获取下拉框 | ||||
|     async getDict() { | ||||
| 			const res = await getDictDatas(this.DICT_TYPE.EQU_ALARM_LEVEL) | ||||
| 			console.log('111', res) | ||||
| 			this.formConfig[2].selectOptions = res.map(item => { | ||||
| 				return { | ||||
| 					id: item.value, | ||||
| 					name: item.label | ||||
| 				} | ||||
| 			}) | ||||
| 		}, | ||||
| 		buttonClick(val) { | ||||
| 			switch (val.btnName) { | ||||
| 				case 'search': | ||||
| 					this.listQuery.pageNo = 1; | ||||
| 					this.listQuery.pageSize = 10; | ||||
| 					this.listQuery.alarmSource = val.name ? val.name : undefined; | ||||
| 					this.listQuery.alarmGrade = val.alarmGrade ? val.alarmGrade : undefined; | ||||
| 					if (val.time) { | ||||
| 						this.listQuery.alarmTime[0] = val.time[0] | ||||
| 						this.listQuery.alarmTime[1] = val.time[1] | ||||
| 					} else { | ||||
| 						this.listQuery.alarmTime = [] | ||||
| 					} | ||||
| 					this.getDataList(); | ||||
| 					break; | ||||
| 				case 'reset': | ||||
| 					this.$refs.searchBarForm.resetForm(); | ||||
| 					this.listQuery = { | ||||
| 						pageSize: 10, | ||||
| 						pageNo: 1, | ||||
| 						total: 1, | ||||
| 					}; | ||||
| 					this.getDataList(); | ||||
| 					break; | ||||
| 				case 'add': | ||||
| 					this.addOrEditTitle = '新增'; | ||||
| 					this.addOrUpdateVisible = true; | ||||
| 					this.addOrUpdateHandle(); | ||||
| 					break; | ||||
| 				case 'export': | ||||
| 					this.handleExport(); | ||||
| 					break; | ||||
| 				default: | ||||
| 					console.log(val); | ||||
| 			} | ||||
| 		}, | ||||
| 	}, | ||||
| }; | ||||
| </script> | ||||
| @@ -1,103 +0,0 @@ | ||||
| <!-- | ||||
|  * @Author: zwq | ||||
|  * @Date: 2021-11-18 14:16:25 | ||||
|  * @LastEditors: DY | ||||
|  * @LastEditTime: 2023-11-03 10:53:43 | ||||
|  * @Description: | ||||
| --> | ||||
| <template> | ||||
| 	<el-form | ||||
| 		:model="dataForm" | ||||
| 		:rules="dataRule" | ||||
| 		ref="dataForm" | ||||
| 		@keyup.enter.native="dataFormSubmit()" | ||||
| 		label-width="80px"> | ||||
| 		<el-row :gutter="20"> | ||||
| 			<el-col :span="12"> | ||||
| 				<el-form-item label="客户编号" prop="code"> | ||||
| 					<el-input v-model="dataForm.code" clearable placeholder="请输入客户编号" /> | ||||
| 				</el-form-item> | ||||
| 			</el-col> | ||||
| 			<el-col :span="12"> | ||||
| 				<el-form-item label="客户名称" prop="name"> | ||||
| 					<el-input v-model="dataForm.name" clearable placeholder="请输入客户名称" /> | ||||
| 				</el-form-item> | ||||
| 			</el-col> | ||||
| 		</el-row> | ||||
| 		<el-row :gutter="20"> | ||||
| 			<el-col :span="12"> | ||||
| 				<el-form-item label="联系人" prop="contact"> | ||||
| 					<el-input v-model="dataForm.contact" clearable placeholder="请输入联系人" /> | ||||
| 				</el-form-item> | ||||
| 			</el-col> | ||||
| 			<el-col :span="12"> | ||||
| 				<el-form-item label="联系电话" prop="telephone"> | ||||
| 					<el-input | ||||
| 						v-model="dataForm.telephone" | ||||
| 						maxlength="11" | ||||
| 						placeholder="请输入联系电话" /> | ||||
| 				</el-form-item> | ||||
| 			</el-col> | ||||
| 		</el-row> | ||||
| 		<el-form-item label="地址" prop="address"> | ||||
| 			<el-input | ||||
| 				v-model="dataForm.address" | ||||
| 				placeholder="请输入地址" /> | ||||
| 		</el-form-item> | ||||
| 		<el-form-item label="备注" prop="remark"> | ||||
| 			<el-input | ||||
| 				v-model="dataForm.remark" | ||||
| 				placeholder="请输入备注" /> | ||||
| 		</el-form-item> | ||||
| 	</el-form> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import basicAdd from '../../core/mixins/basic-add'; | ||||
| import { createCustomer, updateCustomer, getCustomer, getCode } from "@/api/base/coreCustomer"; | ||||
|  | ||||
| export default { | ||||
| 	mixins: [basicAdd], | ||||
| 	data() { | ||||
| 		return { | ||||
| 			urlOptions: { | ||||
| 			  isGetCode: true, | ||||
|         codeURL: getCode, | ||||
| 				createURL: createCustomer, | ||||
| 				updateURL: updateCustomer, | ||||
| 				infoURL: getCustomer | ||||
| 			}, | ||||
| 			dataForm: { | ||||
|         id: undefined, | ||||
|         code: undefined, | ||||
|         name: undefined, | ||||
|         telephone: undefined, | ||||
| 				contact: undefined, | ||||
| 				address: undefined, | ||||
|         remark: undefined | ||||
| 			}, | ||||
| 			dataRule: { | ||||
|         code: [{ required: true, message: "专业编码不能为空", trigger: "blur" }], | ||||
|         name: [{ required: true, message: "专业名称不能为空", trigger: "blur" }], | ||||
| 				contact: [{ required: true, message: "联系人不能为空", trigger: "blur" }], | ||||
| 				telephone: [ | ||||
| 					{ required: false, trigger: "blur", message: "手机号不能为空" }, | ||||
|           { | ||||
|             validator: function (rule, value, callback) { | ||||
|               if (value) { | ||||
| 								if (/^(?:(?:\+|00)86)?1(?:3[\d]|4[5-79]|5[0-35-9]|6[5-7]|7[0-8]|8[\d]|9[189])\d{8}$/.test(value) === false) { | ||||
| 									callback(new Error("手机号格式错误")); | ||||
| 								} | ||||
| 							} else { | ||||
|                 callback(); | ||||
|               } | ||||
|             }, trigger: "blur" | ||||
|           } | ||||
|         ] | ||||
|       } | ||||
| 		}; | ||||
| 	}, | ||||
| 	mounted() {}, | ||||
| 	methods: {} | ||||
| }; | ||||
| </script> | ||||
| @@ -1,176 +0,0 @@ | ||||
| <template> | ||||
| 	<div class="app-container"> | ||||
| 		<search-bar | ||||
| 			:formConfigs="formConfig" | ||||
| 			ref="searchBarForm" | ||||
| 			@headBtnClick="buttonClick" /> | ||||
| 		<base-table | ||||
| 			v-loading="dataListLoading" | ||||
| 			:table-props="tableProps" | ||||
| 			:page="listQuery.pageNo" | ||||
| 			:limit="listQuery.pageSize" | ||||
| 			:table-data="tableData"> | ||||
| 			<method-btn | ||||
| 				v-if="tableBtn.length" | ||||
| 				slot="handleBtn" | ||||
| 				:width="120" | ||||
| 				label="操作" | ||||
| 				:method-list="tableBtn" | ||||
| 				@clickBtn="handleClick" /> | ||||
| 		</base-table> | ||||
| 		<pagination | ||||
| 			:limit.sync="listQuery.pageSize" | ||||
| 			:page.sync="listQuery.pageNo" | ||||
| 			:total="listQuery.total" | ||||
| 			@pagination="getDataList" /> | ||||
| 		<base-dialog | ||||
| 			:dialogTitle="addOrEditTitle" | ||||
| 			:dialogVisible="addOrUpdateVisible" | ||||
| 			@cancel="handleCancel" | ||||
| 			@confirm="handleConfirm" | ||||
| 			:before-close="handleCancel" | ||||
| 			width="50%"> | ||||
| 			<add-or-update | ||||
| 				ref="addOrUpdate" | ||||
| 				@refreshDataList="successSubmit"></add-or-update> | ||||
| 		</base-dialog> | ||||
| 	</div> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import AddOrUpdate from './add-or-updata'; | ||||
| import basicPage from '../../core/mixins/basic-page'; | ||||
| import { parseTime } from '../../core/mixins/code-filter'; | ||||
| import { | ||||
| 	getCustomerPage, | ||||
| 	deleteCustomer | ||||
| } from '@/api/base/coreCustomer'; | ||||
|  | ||||
| const tableProps = [ | ||||
| 	{ | ||||
| 		prop: 'createTime', | ||||
| 		label: '添加时间', | ||||
| 		filter: parseTime | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'name', | ||||
| 		label: '客户名称' | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'code', | ||||
| 		label: '客户编码' | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'contact', | ||||
| 		label: '联系人' | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'telephone', | ||||
| 		label: '联系电话' | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'address', | ||||
| 		label: '地址' | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'remark', | ||||
| 		label: '备注' | ||||
| 	}, | ||||
| ]; | ||||
|  | ||||
| export default { | ||||
| 	mixins: [basicPage], | ||||
| 	data() { | ||||
| 		return { | ||||
| 			urlOptions: { | ||||
| 				getDataListURL: getCustomerPage, | ||||
| 				deleteURL: deleteCustomer | ||||
| 			}, | ||||
| 			tableProps, | ||||
| 			tableBtn: [ | ||||
| 				this.$auth.hasPermi(`base:core-customer:update`) | ||||
| 					? { | ||||
| 							type: 'edit', | ||||
| 							btnName: '编辑', | ||||
| 					  } | ||||
| 					: undefined, | ||||
|           this.$auth.hasPermi(`base:core-customer:delete`) | ||||
| 					? { | ||||
| 							type: 'delete', | ||||
| 							btnName: '删除', | ||||
| 					  } | ||||
| 					: undefined, | ||||
| 			].filter((v)=>v), | ||||
| 			tableData: [], | ||||
| 			formConfig: [ | ||||
| 				{ | ||||
| 					type: 'input', | ||||
| 					label: '名称', | ||||
| 					placeholder: '专业', | ||||
| 					param: 'name', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'button', | ||||
| 					btnName: '查询', | ||||
| 					name: 'search', | ||||
| 					color: 'primary', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'separate', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: this.$auth.hasPermi('base:core-customer:create') ? 'button' : '', | ||||
| 					btnName: '新增', | ||||
| 					name: 'add', | ||||
| 					color: 'success', | ||||
| 					plain: true | ||||
| 				}, | ||||
| 			], | ||||
| 		}; | ||||
| 	}, | ||||
| 	components: { | ||||
| 		AddOrUpdate, | ||||
| 	}, | ||||
| 	created() {}, | ||||
| 	methods: { | ||||
| 		// 获取数据列表 | ||||
|     // getDataList() { | ||||
|     //   this.dataListLoading = true; | ||||
|     //   this.urlOptions.getDataListURL(this.listQuery).then(response => { | ||||
|     //     this.tableData = response.data.list; | ||||
|     //     this.listQuery.total = response.data.total; | ||||
|     //     this.dataListLoading = false; | ||||
|     //   }); | ||||
|     // }, | ||||
| 		buttonClick(val) { | ||||
| 			switch (val.btnName) { | ||||
| 				case 'search': | ||||
| 					this.listQuery.pageNo = 1; | ||||
| 					this.listQuery.pageSize = 10; | ||||
| 					this.listQuery.name = val.name ? val.name : undefined; | ||||
| 					this.getDataList(); | ||||
| 					break; | ||||
| 				case 'reset': | ||||
| 					this.$refs.searchBarForm.resetForm(); | ||||
| 					this.listQuery = { | ||||
| 						pageSize: 10, | ||||
| 						pageNo: 1, | ||||
| 						total: 1, | ||||
| 					}; | ||||
| 					this.getDataList(); | ||||
| 					break; | ||||
| 				case 'add': | ||||
| 					this.addOrEditTitle = '新增'; | ||||
| 					this.addOrUpdateVisible = true; | ||||
| 					this.addOrUpdateHandle(); | ||||
| 					break; | ||||
| 				case 'export': | ||||
| 					this.handleExport(); | ||||
| 					break; | ||||
| 				default: | ||||
| 					console.log(val); | ||||
| 			} | ||||
| 		}, | ||||
| 	}, | ||||
| }; | ||||
| </script> | ||||
| @@ -1,107 +0,0 @@ | ||||
| <!-- | ||||
|  * @Author: zwq | ||||
|  * @Date: 2021-11-18 14:16:25 | ||||
|  * @LastEditors: DY | ||||
|  * @LastEditTime: 2023-11-02 14:16:30 | ||||
|  * @Description: | ||||
| --> | ||||
| <template> | ||||
| 	<el-form | ||||
| 		:model="dataForm" | ||||
| 		:rules="dataRule" | ||||
| 		ref="dataForm" | ||||
| 		@keyup.enter.native="dataFormSubmit()" | ||||
| 		label-width="80px"> | ||||
| 		<el-row :gutter="20"> | ||||
| 			<el-col :span="12"> | ||||
| 				<el-form-item label="部门名称" prop="name"> | ||||
| 					<el-input v-model="dataForm.name" clearable placeholder="请输入部门名称" /> | ||||
| 				</el-form-item> | ||||
| 			</el-col> | ||||
| 			<el-col :span="12"> | ||||
| 				<el-form-item label="部门编码" prop="code"> | ||||
| 					<el-input v-model="dataForm.code" clearable placeholder="请输入部门编码" /> | ||||
| 				</el-form-item> | ||||
| 			</el-col> | ||||
| 		</el-row> | ||||
| 		<el-row :gutter="20"> | ||||
| 			<el-col :span="12"> | ||||
| 				<el-form-item label="上级部门" prop="parentId"> | ||||
| 					<treeselect v-model="dataForm.parentId" :options="menuOptions" :normalizer="normalizer" :show-count="true" placeholder="选择上级部门"/> | ||||
| 				</el-form-item> | ||||
| 			</el-col> | ||||
| 			<el-col :span="12"> | ||||
| 				<el-form-item label="备注" prop="remark"> | ||||
| 					<el-input | ||||
| 						v-model="dataForm.remark" | ||||
| 						placeholder="请输入备注" /> | ||||
| 				</el-form-item> | ||||
| 			</el-col> | ||||
| 		</el-row> | ||||
| 	</el-form> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import basicAdd from '../../core/mixins/basic-add'; | ||||
| import { createCoreDepartment, updateCoreDepartment, getCoreDepartment, getCode, getCoreDepartmentList } from "@/api/base/coreDepartment"; | ||||
| import Treeselect from "@riophae/vue-treeselect"; | ||||
| import "@riophae/vue-treeselect/dist/vue-treeselect.css"; | ||||
|  | ||||
| export default { | ||||
| 	mixins: [basicAdd], | ||||
| 	components: { Treeselect }, | ||||
| 	data() { | ||||
| 		return { | ||||
| 			urlOptions: { | ||||
| 			  isGetCode: true, | ||||
|         codeURL: getCode, | ||||
| 				createURL: createCoreDepartment, | ||||
| 				updateURL: updateCoreDepartment, | ||||
| 				infoURL: getCoreDepartment, | ||||
| 			}, | ||||
| 			dataForm: { | ||||
|         id: undefined, | ||||
|         code: undefined, | ||||
|         name: undefined, | ||||
|         parentId: undefined, | ||||
|         remark: undefined, | ||||
| 			}, | ||||
| 			departmentlList: [], | ||||
| 			menuOptions: [], | ||||
| 			dataRule: { | ||||
|         code: [{ required: true, message: "部门编码不能为空", trigger: "blur" }], | ||||
|         name: [{ required: true, message: "部门名称不能为空", trigger: "blur" }], | ||||
|       } | ||||
| 		}; | ||||
| 	}, | ||||
| 	mounted() { | ||||
| 		this.getDict() | ||||
| 	}, | ||||
| 	methods: { | ||||
| 		async getDict() { | ||||
| 			// 部门列表 | ||||
| 			this.menuOptions = [] | ||||
| 			const res = await getCoreDepartmentList(); | ||||
| 			this.departmentlList = res.data.map(item => { | ||||
| 				item.parentId = item.parentId ? item.parentId : 0 | ||||
| 				return item | ||||
| 			}); | ||||
| 			const menu = { id: 0, name: '总部门', children: [] }; | ||||
| 			menu.children = this.handleTree(this.departmentlList, "id") | ||||
| 			this.menuOptions.push(menu) | ||||
| 			console.log('你好', this.menuOptions) | ||||
| 		}, | ||||
| 		/** 转换菜单数据结构 */ | ||||
|     normalizer(node) { | ||||
|       if (node.children && !node.children.length) { | ||||
|         delete node.children; | ||||
|       } | ||||
|       return { | ||||
|         id: node.id, | ||||
|         label: node.name, | ||||
|         children: node.children | ||||
|       }; | ||||
|     } | ||||
| 	}, | ||||
| }; | ||||
| </script> | ||||
| @@ -1,168 +0,0 @@ | ||||
| <template> | ||||
| 	<div class="app-container"> | ||||
| 		<search-bar | ||||
| 			:formConfigs="formConfig" | ||||
| 			ref="searchBarForm" | ||||
| 			@headBtnClick="buttonClick" /> | ||||
| 		<base-table | ||||
| 			v-loading="dataListLoading" | ||||
| 			:table-props="tableProps" | ||||
| 			:page="listQuery.pageNo" | ||||
| 			:limit="listQuery.pageSize" | ||||
| 			:table-data="tableData"> | ||||
| 			<method-btn | ||||
| 				v-if="tableBtn.length" | ||||
| 				slot="handleBtn" | ||||
| 				:width="120" | ||||
| 				label="操作" | ||||
| 				:method-list="tableBtn" | ||||
| 				@clickBtn="handleClick" /> | ||||
| 		</base-table> | ||||
| 		<pagination | ||||
| 			:limit.sync="listQuery.pageSize" | ||||
| 			:page.sync="listQuery.pageNo" | ||||
| 			:total="listQuery.total" | ||||
| 			@pagination="getDataList" /> | ||||
| 		<base-dialog | ||||
| 			:dialogTitle="addOrEditTitle" | ||||
| 			:dialogVisible="addOrUpdateVisible" | ||||
| 			@cancel="handleCancel" | ||||
| 			@confirm="handleConfirm" | ||||
| 			:before-close="handleCancel" | ||||
| 			width="50%"> | ||||
| 			<add-or-update | ||||
| 				ref="addOrUpdate" | ||||
| 				@refreshDataList="successSubmit"></add-or-update> | ||||
| 		</base-dialog> | ||||
| 	</div> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import AddOrUpdate from './add-or-updata'; | ||||
| import basicPage from '../../core/mixins/basic-page'; | ||||
| import { parseTime } from '../../core/mixins/code-filter'; | ||||
| import { | ||||
| 	getCoreDepartmentPage, | ||||
| 	deleteCoreDepartment | ||||
| } from '@/api/base/coreDepartment'; | ||||
|  | ||||
| const tableProps = [ | ||||
| 	{ | ||||
| 		prop: 'createTime', | ||||
| 		label: '添加时间', | ||||
| 		filter: parseTime | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'name', | ||||
| 		label: '部门名称' | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'code', | ||||
| 		label: '部门编码' | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'parentName', | ||||
| 		label: '上级部门' | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'remark', | ||||
| 		label: '备注' | ||||
| 	}, | ||||
| ]; | ||||
|  | ||||
| export default { | ||||
| 	mixins: [basicPage], | ||||
| 	data() { | ||||
| 		return { | ||||
| 			urlOptions: { | ||||
| 				getDataListURL: getCoreDepartmentPage, | ||||
| 				deleteURL: deleteCoreDepartment | ||||
| 			}, | ||||
| 			tableProps, | ||||
| 			tableBtn: [ | ||||
| 				this.$auth.hasPermi(`base:core-department:update`) | ||||
| 					? { | ||||
| 							type: 'edit', | ||||
| 							btnName: '编辑', | ||||
| 					  } | ||||
| 					: undefined, | ||||
|           this.$auth.hasPermi(`base:core-department:delete`) | ||||
| 					? { | ||||
| 							type: 'delete', | ||||
| 							btnName: '删除', | ||||
| 					  } | ||||
| 					: undefined, | ||||
| 			].filter((v)=>v), | ||||
| 			tableData: [], | ||||
| 			formConfig: [ | ||||
| 				{ | ||||
| 					type: 'input', | ||||
| 					label: '部门名', | ||||
| 					placeholder: '部门名', | ||||
| 					param: 'name', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'button', | ||||
| 					btnName: '查询', | ||||
| 					name: 'search', | ||||
| 					color: 'primary', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'separate', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: this.$auth.hasPermi('base:core-department:create') ? 'button' : '', | ||||
| 					btnName: '新增', | ||||
| 					name: 'add', | ||||
| 					color: 'success', | ||||
| 					plain: true | ||||
| 				}, | ||||
| 			], | ||||
| 		}; | ||||
| 	}, | ||||
| 	components: { | ||||
| 		AddOrUpdate, | ||||
| 	}, | ||||
| 	created() {}, | ||||
| 	methods: { | ||||
| 		// 获取数据列表 | ||||
|     // getDataList() { | ||||
|     //   this.dataListLoading = true; | ||||
|     //   this.urlOptions.getDataListURL(this.listQuery).then(response => { | ||||
|     //     this.tableData = response.data.list; | ||||
|     //     this.listQuery.total = response.data.total; | ||||
|     //     this.dataListLoading = false; | ||||
|     //   }); | ||||
|     // }, | ||||
| 		buttonClick(val) { | ||||
| 			switch (val.btnName) { | ||||
| 				case 'search': | ||||
| 					this.listQuery.pageNo = 1; | ||||
| 					this.listQuery.pageSize = 10; | ||||
| 					this.listQuery.name = val.name ? val.name : undefined; | ||||
| 					this.getDataList(); | ||||
| 					break; | ||||
| 				case 'reset': | ||||
| 					this.$refs.searchBarForm.resetForm(); | ||||
| 					this.listQuery = { | ||||
| 						pageSize: 10, | ||||
| 						pageNo: 1, | ||||
| 						total: 1, | ||||
| 					}; | ||||
| 					this.getDataList(); | ||||
| 					break; | ||||
| 				case 'add': | ||||
| 					this.addOrEditTitle = '新增'; | ||||
| 					this.addOrUpdateVisible = true; | ||||
| 					this.addOrUpdateHandle(); | ||||
| 					break; | ||||
| 				case 'export': | ||||
| 					this.handleExport(); | ||||
| 					break; | ||||
| 				default: | ||||
| 					console.log(val); | ||||
| 			} | ||||
| 		}, | ||||
| 	}, | ||||
| }; | ||||
| </script> | ||||
| @@ -1,360 +0,0 @@ | ||||
| <template> | ||||
| 	<div class="app-container"> | ||||
| 		<!-- 搜索工作栏 --> | ||||
| 		<SearchBar | ||||
| 			:formConfigs="searchBarFormConfig" | ||||
| 			ref="search-bar" | ||||
| 			@headBtnClick="handleSearchBarBtnClick" /> | ||||
|  | ||||
| 		<!-- 列表 --> | ||||
| 		<base-table | ||||
| 			:table-props="tableProps" | ||||
| 			:page="queryParams.pageNo" | ||||
| 			:limit="queryParams.pageSize" | ||||
| 			:table-data="list" | ||||
| 			@emitFun="handleEmitFun"> | ||||
| 			<method-btn | ||||
| 				v-if="tableBtn.length" | ||||
| 				slot="handleBtn" | ||||
| 				label="操作" | ||||
| 				:width="120" | ||||
| 				:method-list="tableBtn" | ||||
| 				@clickBtn="handleTableBtnClick" /> | ||||
| 		</base-table> | ||||
|  | ||||
| 		<!-- 分页组件 --> | ||||
| 		<pagination | ||||
| 			v-show="total > 0" | ||||
| 			:total="total" | ||||
| 			:page.sync="queryParams.pageNo" | ||||
| 			:limit.sync="queryParams.pageSize" | ||||
| 			@pagination="getList" /> | ||||
|  | ||||
| 		<!-- 对话框(添加 / 修改) --> | ||||
| 		<base-dialog | ||||
| 			:dialogTitle="title" | ||||
| 			:dialogVisible="open" | ||||
| 			@close="cancel" | ||||
| 			@cancel="cancel" | ||||
| 			@confirm="submitForm"> | ||||
| 			<DialogForm | ||||
| 				v-if="open" | ||||
| 				ref="form" | ||||
| 				v-model="form" | ||||
| 				:has-files="false" | ||||
| 				:rows="rows" /> | ||||
| 		</base-dialog> | ||||
| 	</div> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import moment from 'moment'; | ||||
| import basicPageMixin from '@/mixins/lb/basicPageMixin'; | ||||
|  | ||||
| // import { getAccessToken } from '@/utils/auth'; | ||||
|  | ||||
| export default { | ||||
| 	name: 'EquipmentLineBind', | ||||
| 	components: {}, | ||||
| 	mixins: [basicPageMixin], | ||||
| 	data() { | ||||
| 		return { | ||||
| 			basePath: '/base/core-equipment-bind-section', | ||||
| 			searchBarKeys: ['equipmentName', 'productionLineId'], | ||||
| 			tableBtn: [ | ||||
| 				this.$auth.hasPermi('base:core-equipment-bind-section:update') | ||||
| 					? { | ||||
| 							type: 'edit', | ||||
| 							btnName: '修改', | ||||
| 					  } | ||||
| 					: undefined, | ||||
| 				this.$auth.hasPermi('base:core-equipment-bind-section:delete') | ||||
| 					? { | ||||
| 							type: 'delete', | ||||
| 							btnName: '删除', | ||||
| 					  } | ||||
| 					: undefined, | ||||
| 			].filter((v) => v), | ||||
| 			tableProps: [ | ||||
| 				{ | ||||
| 					prop: 'createTime', | ||||
| 					label: '添加时间', | ||||
| 					fixed: true, | ||||
| 					width: 180, | ||||
| 					filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'), | ||||
| 				}, | ||||
| 				{ prop: 'productionLineName', label: '产线名称' }, | ||||
| 				{ prop: 'workshopSectionName', label: '工段名称' }, | ||||
| 				{ prop: 'equipmentName', label: '设备名称' }, | ||||
| 				{ prop: 'sort', label: '工段中排序' }, | ||||
| 				{ | ||||
| 					prop: 'lineDataType', | ||||
| 					label: '产线统计类型', | ||||
| 					filter: (val) => | ||||
| 						val != null ? ['无类型', '进片数量统计', '出片数量统计'][val] : '', | ||||
| 				}, | ||||
| 				{ | ||||
| 					prop: 'sectionDataType', | ||||
| 					label: '工段统计类型', | ||||
| 					filter: (val) => | ||||
| 						val != null ? ['无类型', '进片数量统计', '出片数量统计'][val] : '', | ||||
| 				}, | ||||
| 				// { prop: 'remark', label: '备注' }, | ||||
| 			], | ||||
| 			searchBarFormConfig: [ | ||||
| 				{ | ||||
| 					type: 'select', | ||||
| 					label: '产线', | ||||
| 					placeholder: '请选择产线', | ||||
| 					param: 'productionLineId', | ||||
| 					selectOptions: [], | ||||
| 					filterable: true, | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'input', | ||||
| 					label: '设备名', | ||||
| 					placeholder: '请输入设备名称', | ||||
| 					param: 'equipmentName', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'button', | ||||
| 					btnName: '查询', | ||||
| 					name: 'search', | ||||
| 					color: 'primary', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'separate', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: this.$auth.hasPermi('base:core-equipment-bind-section:create') | ||||
| 						? 'button' | ||||
| 						: '', | ||||
| 					btnName: '新增', | ||||
| 					name: 'add', | ||||
| 					plain: true, | ||||
| 					color: 'success', | ||||
| 				}, | ||||
| 				// { | ||||
| 				// 	type: this.$auth.hasPermi('base:quality-inspection-type:export') | ||||
| 				// 		? 'button' | ||||
| 				// 		: '', | ||||
| 				// 	btnName: '导出', | ||||
| 				// 	name: 'export', | ||||
| 				// 	color: 'warning', | ||||
| 				// }, | ||||
| 			], | ||||
| 			rows: [ | ||||
| 				[ | ||||
| 					{ | ||||
| 						select: true, | ||||
| 						label: '产线', | ||||
| 						prop: 'productionLineId', | ||||
| 						rules: [{ required: true, message: '不能为空', trigger: 'blur' }], | ||||
| 						url: '/base/core-production-line/listAll', | ||||
| 						bind: { clearable: true, filterable: true }, | ||||
| 						// watch: 'workshopSectionId' | ||||
| 					}, | ||||
| 					{ | ||||
| 						select: true, | ||||
| 						label: '工段', | ||||
| 						prop: 'workshopSectionId', | ||||
| 						depends: 'productionLineId', | ||||
| 						rules: [{ required: true, message: '不能为空', trigger: 'blur' }], | ||||
| 						bind: { clearable: true, filterable: true }, | ||||
| 						url: '/base/core-workshop-section/listByParentId', | ||||
| 					}, | ||||
| 				], | ||||
| 				[ | ||||
| 					{ | ||||
| 						select: true, | ||||
| 						label: '设备', | ||||
| 						prop: 'equipmentId', | ||||
| 						rules: [{ required: true, message: '不能为空', trigger: 'blur' }], | ||||
| 						bind: { clearable: true, filterable: true }, | ||||
| 						url: '/base/core-equipment/listAll', | ||||
| 					}, | ||||
| 					{ | ||||
| 						input: true, | ||||
| 						label: '工段排序', | ||||
| 						prop: 'sort', | ||||
| 					}, | ||||
| 				], | ||||
| 				[ | ||||
| 					{ | ||||
| 						select: true, | ||||
| 						options: [ | ||||
| 							{ label: '无类型', value: 0 }, | ||||
| 							{ label: '进片数量统计', value: 1 }, | ||||
| 							{ label: '出片数量统计', value: 2 }, | ||||
| 						], | ||||
| 						label: '产线统计类型', | ||||
| 						prop: 'lineDataType', | ||||
| 					}, | ||||
| 					{ | ||||
| 						select: true, | ||||
| 						options: [ | ||||
| 							{ label: '无类型', value: 0 }, | ||||
| 							{ label: '进片数量统计', value: 1 }, | ||||
| 							{ label: '出片数量统计', value: 2 }, | ||||
| 						], | ||||
| 						label: '工段统计类型', | ||||
| 						prop: 'sectionDataType', | ||||
| 					}, | ||||
| 				], | ||||
| 			], | ||||
| 			// 是否显示弹出层 | ||||
| 			open: false, | ||||
| 			// 查询参数 | ||||
| 			queryParams: { | ||||
| 				pageNo: 1, | ||||
| 				pageSize: 10, | ||||
| 				equipmentName: null, | ||||
| 				productionLineId: null, | ||||
| 			}, | ||||
| 			// 表单参数 | ||||
| 			form: {}, | ||||
| 		}; | ||||
| 	}, | ||||
| 	created() { | ||||
| 		this.initSearchOptions(); | ||||
| 		this.getList(); | ||||
| 	}, | ||||
| 	methods: { | ||||
| 		/** 初始化查询条件 */ | ||||
| 		async initSearchOptions() { | ||||
| 			this.http('/base/core-production-line/listAll', 'get').then( | ||||
| 				({ code, data }) => { | ||||
| 					if (code == 0) { | ||||
| 						this.searchBarFormConfig[0].selectOptions = data.map((item) => { | ||||
| 							return { | ||||
| 								name: item.name, | ||||
| 								id: item.id, | ||||
| 							}; | ||||
| 						}); | ||||
| 					} | ||||
| 				} | ||||
| 			); | ||||
| 		}, | ||||
| 		/** 查询列表 */ | ||||
| 		getList() { | ||||
| 			this.loading = true; | ||||
| 			// 执行查询 | ||||
| 			this.recv(this.queryParams).then(({ code, data }) => { | ||||
| 				// if (code == 0) { | ||||
| 				this.list = data.list; | ||||
| 				this.total = data.total; | ||||
| 				this.loading = false; | ||||
| 				// } | ||||
| 			}); | ||||
| 			// .catch(err => { | ||||
| 			// 	this.list = []; | ||||
| 			// 	this.total = 0; | ||||
| 			// 	this.loading = false; | ||||
| 			// }) | ||||
| 		}, | ||||
| 		/** 取消按钮 */ | ||||
| 		cancel() { | ||||
| 			this.open = false; | ||||
| 			this.reset(); | ||||
| 		}, | ||||
| 		/** 表单重置 */ | ||||
| 		reset() { | ||||
| 			this.form = { | ||||
| 				id: undefined, | ||||
| 				productionLineId: undefined, | ||||
| 				// 工段 | ||||
| 				workshopSectionId: undefined, | ||||
| 				// 设备 | ||||
| 				equipmentId: undefined, | ||||
| 				// 工段排序 | ||||
| 				sort: undefined, | ||||
| 				// 产线统计类型 | ||||
| 				lineDataType: undefined, | ||||
| 				// 工段统计类型 | ||||
| 				sectionDataType: undefined, | ||||
| 			}; | ||||
| 			this.resetForm('form'); | ||||
| 		}, | ||||
| 		/** 搜索按钮操作 */ | ||||
| 		handleQuery() { | ||||
| 			this.queryParams.pageNo = 1; | ||||
| 			this.getList(); | ||||
| 		}, | ||||
| 		/** 重置按钮操作 */ | ||||
| 		resetQuery() { | ||||
| 			this.resetForm('queryForm'); | ||||
| 			this.handleQuery(); | ||||
| 		}, | ||||
| 		/** 新增按钮操作 */ | ||||
| 		handleAdd() { | ||||
| 			this.reset(); | ||||
| 			this.open = true; | ||||
| 			this.title = '添加设备工段绑定'; | ||||
| 		}, | ||||
| 		/** 修改按钮操作 */ | ||||
| 		handleUpdate(row) { | ||||
| 			this.reset(); | ||||
| 			const id = row.id; | ||||
| 			this.info({ id }).then(({ code, data }) => { | ||||
| 				this.form = data; | ||||
| 				this.open = true; | ||||
| 				this.title = '修改设备工段绑定'; | ||||
| 			}); | ||||
| 		}, | ||||
| 		/** 提交按钮 */ | ||||
| 		submitForm() { | ||||
| 			this.$refs['form'].validate((valid) => { | ||||
| 				if (!valid) { | ||||
| 					return; | ||||
| 				} | ||||
| 				// 修改的提交 | ||||
| 				if (this.form.id != null) { | ||||
| 					this.put(this.form).then(({ code, data }) => { | ||||
| 						this.$modal.msgSuccess('修改成功'); | ||||
| 						this.open = false; | ||||
| 						this.getList(); | ||||
| 					}); | ||||
| 					return; | ||||
| 				} | ||||
| 				this.post(this.form).then(({ code, data }) => { | ||||
| 					this.$modal.msgSuccess('修改成功'); | ||||
| 					this.open = false; | ||||
| 					this.getList(); | ||||
| 				}); | ||||
| 			}); | ||||
| 		}, | ||||
| 		/** 删除按钮操作 */ | ||||
| 		handleDelete(row) { | ||||
| 			const id = row.id; | ||||
| 			this.$modal | ||||
| 				.confirm('是否确认删除绑定"' + row.name + '"?') | ||||
| 				.then(function () { | ||||
| 					return deleteEquipmentType(id); | ||||
| 				}) | ||||
| 				.then(() => { | ||||
| 					this.getList(); | ||||
| 					this.$modal.msgSuccess('删除成功'); | ||||
| 				}) | ||||
| 				.catch(() => {}); | ||||
| 		}, | ||||
| 		/** 导出按钮操作 */ | ||||
| 		handleExport() { | ||||
| 			// 处理查询参数 | ||||
| 			let params = { ...this.queryParams }; | ||||
| 			params.pageNo = undefined; | ||||
| 			params.pageSize = undefined; | ||||
| 			this.$modal | ||||
| 				.confirm('是否确认导出所有设备工段绑定?') | ||||
| 				.then(() => { | ||||
| 					this.exportLoading = true; | ||||
| 					// return exportEquipmentTypeExcel(params); | ||||
| 				}) | ||||
| 				.then((response) => { | ||||
| 					this.$download.excel(response, '设备工段绑定.xls'); | ||||
| 					this.exportLoading = false; | ||||
| 				}) | ||||
| 				.catch(() => {}); | ||||
| 		}, | ||||
| 	}, | ||||
| }; | ||||
| </script> | ||||
| @@ -1,77 +0,0 @@ | ||||
| <!-- | ||||
|  * @Author: zwq | ||||
|  * @Date: 2021-11-18 14:16:25 | ||||
|  * @LastEditors: DY | ||||
|  * @LastEditTime: 2023-11-02 14:24:12 | ||||
|  * @Description: | ||||
| --> | ||||
| <template> | ||||
| 	<el-form | ||||
| 		:model="dataForm" | ||||
| 		:rules="dataRule" | ||||
| 		ref="dataForm" | ||||
| 		@keyup.enter.native="dataFormSubmit()" | ||||
| 		label-width="80px"> | ||||
| 		<el-row :gutter="20"> | ||||
| 			<el-col :span="12"> | ||||
| 				<el-form-item label="专业编号" prop="code"> | ||||
| 					<el-input v-model="dataForm.code" clearable placeholder="请输入专业编号" /> | ||||
| 				</el-form-item> | ||||
| 			</el-col> | ||||
| 			<el-col :span="12"> | ||||
| 				<el-form-item label="专业名称" prop="name"> | ||||
| 					<el-input v-model="dataForm.name" clearable placeholder="请输入专业名称" /> | ||||
| 				</el-form-item> | ||||
| 			</el-col> | ||||
| 		</el-row> | ||||
| 		<el-row :gutter="20"> | ||||
| 			<el-col :span="12"> | ||||
| 				<el-form-item label="缩写" prop="abbreviation"> | ||||
| 					<el-input v-model="dataForm.abbreviation" clearable placeholder="请输入缩写" /> | ||||
| 				</el-form-item> | ||||
| 			</el-col> | ||||
| 			<el-col :span="12"> | ||||
| 				<el-form-item label="备注" prop="remark"> | ||||
| 					<el-input | ||||
| 						v-model="dataForm.remark" | ||||
| 						placeholder="请输入备注" /> | ||||
| 				</el-form-item> | ||||
| 			</el-col> | ||||
| 		</el-row> | ||||
| 	</el-form> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import basicAdd from '../../core/mixins/basic-add'; | ||||
| import { createCoreMajor, updateCoreMajor, getCoreMajor, getCode } from "@/api/base/coreMajor"; | ||||
|  | ||||
| export default { | ||||
| 	mixins: [basicAdd], | ||||
| 	data() { | ||||
| 		return { | ||||
| 			urlOptions: { | ||||
| 			  isGetCode: true, | ||||
|         codeURL: getCode, | ||||
| 				createURL: createCoreMajor, | ||||
| 				updateURL: updateCoreMajor, | ||||
| 				infoURL: getCoreMajor, | ||||
| 			}, | ||||
| 			dataForm: { | ||||
|         id: undefined, | ||||
|         code: undefined, | ||||
|         name: undefined, | ||||
|         abbreviation: undefined, | ||||
|         remark: undefined, | ||||
| 			}, | ||||
| 			departmentlList: [], | ||||
| 			menuOptions: [], | ||||
| 			dataRule: { | ||||
|         code: [{ required: true, message: "专业编码不能为空", trigger: "blur" }], | ||||
|         name: [{ required: true, message: "专业名称不能为空", trigger: "blur" }] | ||||
|       } | ||||
| 		}; | ||||
| 	}, | ||||
| 	mounted() {}, | ||||
| 	methods: {} | ||||
| }; | ||||
| </script> | ||||
| @@ -1,168 +0,0 @@ | ||||
| <template> | ||||
| 	<div class="app-container"> | ||||
| 		<search-bar | ||||
| 			:formConfigs="formConfig" | ||||
| 			ref="searchBarForm" | ||||
| 			@headBtnClick="buttonClick" /> | ||||
| 		<base-table | ||||
| 			v-loading="dataListLoading" | ||||
| 			:table-props="tableProps" | ||||
| 			:page="listQuery.pageNo" | ||||
| 			:limit="listQuery.pageSize" | ||||
| 			:table-data="tableData"> | ||||
| 			<method-btn | ||||
| 				v-if="tableBtn.length" | ||||
| 				slot="handleBtn" | ||||
| 				:width="120" | ||||
| 				label="操作" | ||||
| 				:method-list="tableBtn" | ||||
| 				@clickBtn="handleClick" /> | ||||
| 		</base-table> | ||||
| 		<pagination | ||||
| 			:limit.sync="listQuery.pageSize" | ||||
| 			:page.sync="listQuery.pageNo" | ||||
| 			:total="listQuery.total" | ||||
| 			@pagination="getDataList" /> | ||||
| 		<base-dialog | ||||
| 			:dialogTitle="addOrEditTitle" | ||||
| 			:dialogVisible="addOrUpdateVisible" | ||||
| 			@cancel="handleCancel" | ||||
| 			@confirm="handleConfirm" | ||||
| 			:before-close="handleCancel" | ||||
| 			width="50%"> | ||||
| 			<add-or-update | ||||
| 				ref="addOrUpdate" | ||||
| 				@refreshDataList="successSubmit"></add-or-update> | ||||
| 		</base-dialog> | ||||
| 	</div> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import AddOrUpdate from './add-or-updata'; | ||||
| import basicPage from '../../core/mixins/basic-page'; | ||||
| import { parseTime } from '../../core/mixins/code-filter'; | ||||
| import { | ||||
| 	getCoreMajorPage, | ||||
| 	deleteCoreMajor | ||||
| } from '@/api/base/coreMajor'; | ||||
|  | ||||
| const tableProps = [ | ||||
| 	{ | ||||
| 		prop: 'createTime', | ||||
| 		label: '添加时间', | ||||
| 		filter: parseTime | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'code', | ||||
| 		label: '专业编码' | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'name', | ||||
| 		label: '专业名称' | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'abbreviation', | ||||
| 		label: '缩写' | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'remark', | ||||
| 		label: '备注' | ||||
| 	}, | ||||
| ]; | ||||
|  | ||||
| export default { | ||||
| 	mixins: [basicPage], | ||||
| 	data() { | ||||
| 		return { | ||||
| 			urlOptions: { | ||||
| 				getDataListURL: getCoreMajorPage, | ||||
| 				deleteURL: deleteCoreMajor | ||||
| 			}, | ||||
| 			tableProps, | ||||
| 			tableBtn: [ | ||||
| 				this.$auth.hasPermi(`base:core-major:update`) | ||||
| 					? { | ||||
| 							type: 'edit', | ||||
| 							btnName: '编辑', | ||||
| 					  } | ||||
| 					: undefined, | ||||
|           this.$auth.hasPermi(`base:core-major:delete`) | ||||
| 					? { | ||||
| 							type: 'delete', | ||||
| 							btnName: '删除', | ||||
| 					  } | ||||
| 					: undefined, | ||||
| 			].filter((v)=>v), | ||||
| 			tableData: [], | ||||
| 			formConfig: [ | ||||
| 				{ | ||||
| 					type: 'input', | ||||
| 					label: '名称', | ||||
| 					placeholder: '专业', | ||||
| 					param: 'name', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'button', | ||||
| 					btnName: '查询', | ||||
| 					name: 'search', | ||||
| 					color: 'primary', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'separate', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: this.$auth.hasPermi('base:core-major:create') ? 'button' : '', | ||||
| 					btnName: '新增', | ||||
| 					name: 'add', | ||||
| 					color: 'success', | ||||
| 					plain: true | ||||
| 				}, | ||||
| 			], | ||||
| 		}; | ||||
| 	}, | ||||
| 	components: { | ||||
| 		AddOrUpdate, | ||||
| 	}, | ||||
| 	created() {}, | ||||
| 	methods: { | ||||
| 		// 获取数据列表 | ||||
|     // getDataList() { | ||||
|     //   this.dataListLoading = true; | ||||
|     //   this.urlOptions.getDataListURL(this.listQuery).then(response => { | ||||
|     //     this.tableData = response.data.list; | ||||
|     //     this.listQuery.total = response.data.total; | ||||
|     //     this.dataListLoading = false; | ||||
|     //   }); | ||||
|     // }, | ||||
| 		buttonClick(val) { | ||||
| 			switch (val.btnName) { | ||||
| 				case 'search': | ||||
| 					this.listQuery.pageNo = 1; | ||||
| 					this.listQuery.pageSize = 10; | ||||
| 					this.listQuery.name = val.name ? val.name : undefined; | ||||
| 					this.getDataList(); | ||||
| 					break; | ||||
| 				case 'reset': | ||||
| 					this.$refs.searchBarForm.resetForm(); | ||||
| 					this.listQuery = { | ||||
| 						pageSize: 10, | ||||
| 						pageNo: 1, | ||||
| 						total: 1, | ||||
| 					}; | ||||
| 					this.getDataList(); | ||||
| 					break; | ||||
| 				case 'add': | ||||
| 					this.addOrEditTitle = '新增'; | ||||
| 					this.addOrUpdateVisible = true; | ||||
| 					this.addOrUpdateHandle(); | ||||
| 					break; | ||||
| 				case 'export': | ||||
| 					this.handleExport(); | ||||
| 					break; | ||||
| 				default: | ||||
| 					console.log(val); | ||||
| 			} | ||||
| 		}, | ||||
| 	}, | ||||
| }; | ||||
| </script> | ||||
| @@ -1,65 +0,0 @@ | ||||
| <!-- | ||||
|  * @Author: zwq | ||||
|  * @Date: 2023-08-01 15:27:31 | ||||
|  * @LastEditors: zwq | ||||
|  * @LastEditTime: 2023-08-01 16:25:54 | ||||
|  * @Description: | ||||
| --> | ||||
| <template> | ||||
| 	<div :class="[className, { 'p-0': noPadding }]"> | ||||
| 		<slot /> | ||||
| 	</div> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| export default { | ||||
| 	props: { | ||||
| 		size: { | ||||
| 			// 取值范围:  xl lg md sm | ||||
| 			type: String, | ||||
| 			default: 'de', | ||||
| 			validator: function (val) { | ||||
| 				return ['xl', 'lg', 'de', 'md', 'sm'].indexOf(val) !== -1; | ||||
| 			}, | ||||
| 		}, | ||||
| 		noPadding: { | ||||
| 			type: Boolean, | ||||
| 			default: false, | ||||
| 		}, | ||||
| 	}, | ||||
| 	computed: { | ||||
| 		className: function () { | ||||
| 			return `${this.size}-title`; | ||||
| 		}, | ||||
| 	}, | ||||
| }; | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
| $pxls: (xl, 28px) (lg, 24px) (de, 20px) (md, 18px) (sm, 16px); | ||||
| $mgr: 8px; | ||||
| @each $size, $height in $pxls { | ||||
| 	.#{$size}-title { | ||||
| 		font-size: 18px; | ||||
| 		line-height: $height; | ||||
| 		color: #000; | ||||
| 		font-weight: 500; | ||||
| 		font-family: '微软雅黑', 'Microsoft YaHei', Arial, Helvetica, sans-serif; | ||||
|  | ||||
| 		&::before { | ||||
| 			content: ''; | ||||
| 			display: inline-block; | ||||
| 			vertical-align: top; | ||||
| 			width: 4px; | ||||
| 			height: $height + 2px; | ||||
| 			border-radius: 1px; | ||||
| 			margin-right: $mgr; | ||||
| 			background-color: #0b58ff; | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
|  | ||||
| .p-0 { | ||||
| 	padding: 0; | ||||
| } | ||||
| </style> | ||||
| @@ -1,417 +0,0 @@ | ||||
| <!-- | ||||
|  * @Author: zwq | ||||
|  * @Date: 2021-11-18 14:16:25 | ||||
|  * @LastEditors: DY | ||||
|  * @LastEditTime: 2023-11-04 17:57:18 | ||||
|  * @Description: | ||||
| --> | ||||
| <template> | ||||
| 	<el-drawer | ||||
| 		:visible.sync="visible" | ||||
| 		:show-close="false" | ||||
| 		:wrapper-closable="false" | ||||
| 		class="drawer" | ||||
| 		size="50%"> | ||||
| 		<small-title slot="title" :no-padding="true"> | ||||
| 			{{ isdetail ? '详情' : !dataForm.id ? '新增' : '编辑' }} | ||||
| 		</small-title> | ||||
| 		<div class="content"> | ||||
| 			<div class="visual-part"> | ||||
| 				<el-form | ||||
| 					:model="dataForm" | ||||
| 					:rules="dataRule" | ||||
| 					ref="dataForm" | ||||
| 					@keyup.enter.native="dataFormSubmit()" | ||||
| 					label-width="100px" | ||||
| 					label-position="top"> | ||||
| 					<el-row :gutter="20"> | ||||
| 						<el-col :span="12"> | ||||
| 							<el-form-item label="产品名称" prop="name"> | ||||
| 								<el-input v-model="dataForm.name" :disabled="isdetail" clearable placeholder="请输入产品名称" /> | ||||
| 							</el-form-item> | ||||
| 						</el-col> | ||||
| 						<el-col :span="12"> | ||||
| 							<el-form-item label="产品编码" prop="code"> | ||||
| 								<el-input | ||||
| 									v-model="dataForm.code" | ||||
| 									clearable | ||||
| 									:disabled="isdetail" | ||||
| 									placeholder="请输入产品编码" /> | ||||
| 							</el-form-item> | ||||
| 						</el-col> | ||||
| 					</el-row> | ||||
| 					<el-row :gutter="20"> | ||||
| 						<el-col :span="12"> | ||||
| 							<el-form-item label="物料类型" prop="materialType"> | ||||
| 								<el-select | ||||
| 									v-model="dataForm.materialType" | ||||
| 									filterable | ||||
| 									:disabled="isdetail" | ||||
| 									style="width: 100%" | ||||
| 									placeholder="请选择物料类型"> | ||||
| 									<el-option | ||||
| 										v-for="dict in getDictDatas('material_type')" | ||||
| 										:key="dict.value" | ||||
| 										:label="dict.label" | ||||
| 										:value="dict.value" /> | ||||
| 								</el-select> | ||||
| 							</el-form-item> | ||||
| 						</el-col> | ||||
| 						<el-col :span="12"> | ||||
| 							<el-form-item label="产品类型" prop="productType"> | ||||
| 								<el-select | ||||
| 									v-model="dataForm.productType" | ||||
| 									filterable | ||||
| 									:disabled="isdetail" | ||||
| 									style="width: 100%" | ||||
| 									placeholder="请选择产品类型"> | ||||
| 									<el-option | ||||
| 										v-for="dict in getDictDatas(DICT_TYPE.PRODUCT_TYPE)" | ||||
| 										:key="dict.value" | ||||
| 										:label="dict.label" | ||||
| 										:value="dict.value" /> | ||||
| 								</el-select> | ||||
| 							</el-form-item> | ||||
| 						</el-col> | ||||
| 					</el-row> | ||||
| 					<el-row :gutter="20"> | ||||
| 						<el-col :span="12"> | ||||
| 							<el-form-item label="单位" prop="unit"> | ||||
| 								<el-select | ||||
| 									v-model="dataForm.unit" | ||||
| 									filterable | ||||
| 									:disabled="isdetail" | ||||
| 									style="width: 100%" | ||||
| 									placeholder="请选择单位"> | ||||
| 									<el-option | ||||
| 										v-for="dict in getDictDatas(DICT_TYPE.UNIT_DICT)" | ||||
| 										:key="dict.value" | ||||
| 										:label="dict.label" | ||||
| 										:value="dict.value" /> | ||||
| 								</el-select> | ||||
| 							</el-form-item> | ||||
| 						</el-col> | ||||
| 						<el-col :span="12"> | ||||
| 							<el-form-item label="单位平方数" prop="area"> | ||||
| 								<el-input-number v-model="dataForm.area" :precision="2" style="width: 100%" :disabled="isdetail" clearable placeholder="请输入单位平方数" /> | ||||
| 							</el-form-item> | ||||
| 						</el-col> | ||||
| 					</el-row> | ||||
| 					<el-row :gutter="20"> | ||||
| 						<el-col :span="12"> | ||||
| 							<el-form-item label="规格" prop="specifications"> | ||||
| 								<el-input v-model="dataForm.specifications" :disabled="isdetail" clearable placeholder="请输入规格" /> | ||||
| 							</el-form-item> | ||||
| 						</el-col> | ||||
| 						<el-col :span="12"> | ||||
| 							<el-form-item label="产线生产单位用时(S)" prop="processTime"> | ||||
| 								<el-input v-model.number="dataForm.processTime" type="number" :disabled="isdetail" clearable placeholder="请输入产线生产单位用时" /> | ||||
| 							</el-form-item> | ||||
| 						</el-col> | ||||
| 					</el-row> | ||||
| 					<el-form-item label="备注" prop="remark"> | ||||
| 						<el-input v-model="dataForm.remark" :disabled="isdetail" clearable placeholder="请输入备注" /> | ||||
| 					</el-form-item> | ||||
| 				</el-form> | ||||
| 			</div> | ||||
| 			<div class="drawer-body__footer"> | ||||
| 				<el-button style="" @click="goback()">取消</el-button> | ||||
| 				<el-button v-if="isdetail" type="primary" @click="goEdit()"> | ||||
| 					编辑 | ||||
| 				</el-button> | ||||
| 				<el-button v-else type="primary" @click="dataFormSubmit()">确定</el-button> | ||||
| 			</div> | ||||
|  | ||||
| 			<div class="attr-list" v-if="idAttrShow"> | ||||
| 				<small-title | ||||
| 					style="margin: 16px 0; padding-left: 8px" | ||||
| 					:no-padding="true"> | ||||
| 					产品属性 | ||||
| 				</small-title> | ||||
|  | ||||
| 				<div v-if="!isdetail" class="action_btn"> | ||||
| 					<template> | ||||
| 						<span style="display: inline-block;" @click="addNew()"> | ||||
| 							<svg-icon style="width: 14px; height: 14px" class="item-icon" icon-class="table_add" /> | ||||
| 							<span class="add">添加</span> | ||||
| 						</span> | ||||
| 					</template> | ||||
| 				</div> | ||||
| 				<base-table | ||||
| 					:table-props="tableProps" | ||||
| 					:page="listQuery.pageNo" | ||||
| 					:limit="listQuery.pageSize" | ||||
| 					:table-data="productAttrList"> | ||||
| 					<method-btn | ||||
| 						v-if="!isdetail" | ||||
| 						slot="handleBtn" | ||||
| 						:width="120" | ||||
| 						label="操作" | ||||
| 						:method-list="tableBtn" | ||||
| 						@clickBtn="handleClick" /> | ||||
| 				</base-table> | ||||
| 				<pagination | ||||
| 					v-show="listQuery.total > 0" | ||||
| 					:total="listQuery.total" | ||||
| 					:page.sync="listQuery.pageNo" | ||||
| 					:limit.sync="listQuery.pageSize" | ||||
| 					:page-sizes="[5, 10, 15]" | ||||
| 					@pagination="getList" /> | ||||
|  | ||||
| 				<div class="drawer-body__footer"> | ||||
| 					<el-button type="primary" @click="goback()">关闭</el-button> | ||||
| 				</div> | ||||
| 			</div> | ||||
|  | ||||
| 		</div> | ||||
|  | ||||
| 		<attr-add | ||||
| 			v-if="addOrUpdateVisible" | ||||
| 			ref="addOrUpdate" | ||||
| 			:product-id="dataForm.id" | ||||
| 			@refreshDataList="getList" /> | ||||
| 	</el-drawer> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import basicAdd from '../../core/mixins/basic-add'; | ||||
| import { createCoreProduct, updateCoreProduct, getCoreProduct, getCode, getCoreProductAttrPage, deleteCoreProductAttr } from "@/api/base/coreProduct"; | ||||
| import SmallTitle from './SmallTitle'; | ||||
| import { parseTime } from '../../core/mixins/code-filter'; | ||||
| import attrAdd from './attr-add'; | ||||
| import {DICT_TYPE, getDictDatas} from "@/utils/dict"; | ||||
|  | ||||
| const tableBtn = [ | ||||
| 	{ | ||||
| 		type: 'edit', | ||||
| 		btnName: '编辑', | ||||
| 	}, | ||||
| 	{ | ||||
| 		type: 'delete', | ||||
| 		btnName: '删除', | ||||
| 	}, | ||||
| ]; | ||||
| const tableProps = [ | ||||
| 	{ | ||||
| 		prop: 'createTime', | ||||
| 		label: '添加时间', | ||||
| 		filter: parseTime, | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'name', | ||||
| 		label: '属性名', | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'value', | ||||
| 		label: '属性值', | ||||
| 	}, | ||||
| ]; | ||||
|  | ||||
| const topBtnConfig = [ | ||||
|   { | ||||
|     type: 'add', | ||||
|     btnName: 'btn.add' | ||||
|   } | ||||
| ] | ||||
|  | ||||
| export default { | ||||
| 	mixins: [basicAdd], | ||||
| 	components: { SmallTitle, attrAdd }, | ||||
| 	data() { | ||||
| 		return { | ||||
| 			tableBtn, | ||||
| 			tableProps, | ||||
| 			topBtnConfig, | ||||
| 			addOrUpdateVisible: false, | ||||
| 			urlOptions: { | ||||
| 			  isGetCode: true, | ||||
|         codeURL: getCode, | ||||
| 				createURL: createCoreProduct, | ||||
| 				updateURL: updateCoreProduct, | ||||
| 				infoURL: getCoreProduct, | ||||
| 			}, | ||||
| 			listQuery: { | ||||
| 				pageSize: 10, | ||||
| 				pageNo: 1, | ||||
| 				total: 0, | ||||
| 			}, | ||||
| 			dataForm: { | ||||
|         id: undefined, | ||||
|         code: undefined, | ||||
|         name: '', | ||||
| 				materialType: undefined, | ||||
| 				productType: undefined, | ||||
|         area: undefined, | ||||
| 				specifications: undefined, | ||||
| 				processTime: 0, | ||||
|         remark: undefined, | ||||
| 				unit: undefined | ||||
| 			}, | ||||
| 			productAttrList: [], | ||||
| 			visible: false, | ||||
| 			isdetail: false, | ||||
| 			idAttrShow: false, | ||||
| 			dataRule: { | ||||
|         code: [{ required: true, message: "物料编码不能为空", trigger: "blur" }], | ||||
|         name: [{ required: true, message: "物料名称不能为空", trigger: "blur" }], | ||||
| 				materialType: [{ required: true, message: "物料类型不能为空", trigger: "change" }], | ||||
| 				productType: [{ required: true, message: "产品类型不能为空", trigger: "change" }], | ||||
| 				processTime: [{ required: true, message: "产线生产单位用时不能为空", trigger: "blur" }] | ||||
|       } | ||||
| 		}; | ||||
| 	}, | ||||
| 	mounted() {}, | ||||
| 	methods: { | ||||
| 		initData() { | ||||
| 			this.productAttrList.splice(0); | ||||
| 			this.listQuery.total = 0; | ||||
| 		}, | ||||
| 		handleClick(raw) { | ||||
| 			if (raw.type === 'delete') { | ||||
| 				this.$confirm( | ||||
| 					`确定对${ | ||||
| 						raw.data.attrName | ||||
| 							? '[名称=' + raw.data.attrName + ']' | ||||
| 							: '[序号=' + raw.data._pageIndex + ']' | ||||
| 					}进行删除操作?`, | ||||
| 					'提示', | ||||
| 					{ | ||||
| 						confirmButtonText: '确定', | ||||
| 						cancelButtonText: '取消', | ||||
| 						type: 'warning', | ||||
| 					} | ||||
| 				) | ||||
| 					.then(() => { | ||||
| 						deleteCoreProductAttr(raw.data.id).then(({ data }) => { | ||||
| 							this.$message({ | ||||
| 								message: '操作成功', | ||||
| 								type: 'success', | ||||
| 								duration: 1500, | ||||
| 								onClose: () => { | ||||
| 									this.getList(); | ||||
| 								}, | ||||
| 							}); | ||||
| 						}); | ||||
| 					}) | ||||
| 					.catch(() => {}); | ||||
| 			} else { | ||||
| 				this.addNew(raw.data.id); | ||||
| 			} | ||||
| 		}, | ||||
| 		getList() { | ||||
| 			// 获取产品属性列表 | ||||
| 			getCoreProductAttrPage({ | ||||
| 				...this.listQuery, | ||||
| 				productId: this.dataForm.id, | ||||
| 			}).then((response) => { | ||||
| 				this.productAttrList = response.data.list; | ||||
| 				this.listQuery.total = response.data.total; | ||||
| 			}); | ||||
| 		}, | ||||
| 		init(id, isdetail) { | ||||
| 			this.initData(); | ||||
| 			this.isdetail = isdetail || false; | ||||
| 			this.dataForm.id = id || undefined; | ||||
| 			this.visible = true; | ||||
| 			if (id) { | ||||
| 				this.idAttrShow = true | ||||
| 			} else { | ||||
| 				this.idAttrShow = false | ||||
| 			} | ||||
|  | ||||
| 			this.$nextTick(() => { | ||||
| 				this.$refs['dataForm'].resetFields(); | ||||
|  | ||||
| 				if (this.dataForm.id) { | ||||
| 					// 获取产品详情 | ||||
| 					this.urlOptions.infoURL(id).then(response => { | ||||
|             this.dataForm = response.data | ||||
| 						this.dataForm.unit = String(this.dataForm.unit) | ||||
| 						this.dataForm.materialType = String(this.dataForm.materialType) | ||||
| 						this.dataForm.productType = String(this.dataForm.productType) | ||||
|           }); | ||||
| 					// 获取产品属性列表 | ||||
| 					this.getList(); | ||||
| 				} else { | ||||
| 					if (this.urlOptions.isGetCode) { | ||||
|             this.getCode() | ||||
|           } | ||||
| 				} | ||||
| 			}); | ||||
| 		}, | ||||
| 		goback() { | ||||
| 			this.$emit('refreshDataList'); | ||||
| 			this.visible = false; | ||||
| 			// this.initData(); | ||||
| 		}, | ||||
| 		goEdit() { | ||||
| 			this.isdetail = false; | ||||
| 		}, | ||||
| 		// 新增 / 修改 | ||||
| 		addNew(id) { | ||||
| 			this.addOrUpdateVisible = true; | ||||
| 			this.$nextTick(() => { | ||||
| 				this.$refs.addOrUpdate.init(id); | ||||
| 			}); | ||||
| 		} | ||||
| 	} | ||||
| }; | ||||
| </script> | ||||
| <style scoped> | ||||
| .drawer >>> .el-drawer { | ||||
| 	border-radius: 8px 0 0 8px; | ||||
| 	display: flex; | ||||
| 	flex-direction: column; | ||||
| } | ||||
|  | ||||
| .drawer >>> .el-form-item__label { | ||||
| 	padding: 0; | ||||
| } | ||||
|  | ||||
| .drawer >>> .el-drawer__header { | ||||
| 	margin: 0; | ||||
| 	padding: 32px 32px 24px; | ||||
| 	border-bottom: 1px solid #dcdfe6; | ||||
| } | ||||
| .drawer >>> .el-drawer__body { | ||||
| 	flex: 1; | ||||
| 	height: 1px; | ||||
| 	display: flex; | ||||
| 	flex-direction: column; | ||||
| } | ||||
|  | ||||
| .drawer >>> .content { | ||||
| 	padding: 30px 24px; | ||||
| 	flex: 1; | ||||
| 	display: flex; | ||||
| 	flex-direction: column; | ||||
| 	/* height: 100%; */ | ||||
| } | ||||
|  | ||||
| .drawer >>> .visual-part { | ||||
| 	flex: 1 auto; | ||||
| 	max-height: 76vh; | ||||
| 	overflow: hidden; | ||||
| 	overflow-y: scroll; | ||||
| 	padding-right: 10px; /* 调整滚动条样式 */ | ||||
| } | ||||
|  | ||||
| .drawer >>> .el-form, | ||||
| .drawer >>> .attr-list { | ||||
| 	padding: 0 16px; | ||||
| } | ||||
|  | ||||
| .drawer-body__footer { | ||||
| 	display: flex; | ||||
| 	justify-content: flex-end; | ||||
| 	padding: 18px; | ||||
| } | ||||
| .action_btn { | ||||
|   float: right; | ||||
|   margin: 5px 15px; | ||||
|   font-size: 14px; | ||||
| } | ||||
| .add { | ||||
| 	color: #0b58ff; | ||||
| } | ||||
| </style> | ||||
| @@ -1,141 +0,0 @@ | ||||
| <template> | ||||
| 	<el-dialog | ||||
| 		:visible.sync="visible" | ||||
| 		:width="'35%'" | ||||
| 		:append-to-body="true" | ||||
| 		:close-on-click-modal="false" | ||||
| 		class="dialog"> | ||||
| 		<template #title> | ||||
| 			<slot name="title"> | ||||
| 				<div class="titleStyle"> | ||||
| 					{{ !dataForm.id ? '新增' : '编辑' }} | ||||
| 				</div> | ||||
| 			</slot> | ||||
| 		</template> | ||||
|  | ||||
| 		<el-form | ||||
| 			ref="dataForm" | ||||
| 			:model="dataForm" | ||||
| 			:rules="dataRule" | ||||
| 			label-width="100px" | ||||
| 			@keyup.enter.native="dataFormSubmit()"> | ||||
| 			<el-form-item label="属性名" prop="name"> | ||||
| 				<el-input | ||||
| 					v-model="dataForm.name" | ||||
| 					placeholder="请输入属性名" | ||||
| 					clearable /> | ||||
| 			</el-form-item> | ||||
| 			<el-form-item label="属性值" prop="value"> | ||||
| 				<el-input | ||||
| 					v-model="dataForm.value" | ||||
| 					placeholder="请输入属性值" | ||||
| 					clearable /> | ||||
| 			</el-form-item> | ||||
| 		</el-form> | ||||
|  | ||||
| 		<el-row style="text-align: right"> | ||||
| 			<el-button @click="visible = false">取消</el-button> | ||||
| 			<el-button type="primary" @click="dataFormSubmit()">确定</el-button> | ||||
| 		</el-row> | ||||
| 	</el-dialog> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import { | ||||
| 	createCoreProductAttr, | ||||
| 	updateCoreProductAttr, | ||||
| 	getCoreProductAttr | ||||
| } from '@/api/base/coreProduct'; | ||||
|  | ||||
| export default { | ||||
| 	props: { | ||||
| 		productId: { | ||||
| 			type: String, | ||||
| 			default: '', | ||||
| 		}, | ||||
| 	}, | ||||
| 	data() { | ||||
| 		return { | ||||
| 			visible: false, | ||||
| 			dataForm: { | ||||
| 				id: undefined, | ||||
| 				name: '', | ||||
| 				value: '', | ||||
| 			}, | ||||
| 			dataRule: { | ||||
| 				attrName: [{ required: true, message: '名称不能为空', trigger: 'blur' }], | ||||
| 			}, | ||||
| 		}; | ||||
| 	}, | ||||
| 	methods: { | ||||
| 		init(id) { | ||||
| 			this.dataForm.id = id || ''; | ||||
| 			this.visible = true; | ||||
| 			this.$nextTick(() => { | ||||
| 				this.$refs['dataForm'].resetFields(); | ||||
| 				if (this.dataForm.id) { | ||||
| 					getCoreProductAttr({ | ||||
| 						id: this.dataForm.id | ||||
| 					}).then((res) => { | ||||
| 						const { name, value } = res.data; | ||||
| 						this.dataForm.name = name; | ||||
| 						this.dataForm.value = value; | ||||
| 					}); | ||||
| 				} | ||||
| 			}); | ||||
| 		}, | ||||
| 		// 表单提交 | ||||
| 		dataFormSubmit() { | ||||
| 			this.$refs['dataForm'].validate((valid) => { | ||||
| 				if (valid) { | ||||
| 					// 修改的提交 | ||||
| 					if (this.dataForm.id) { | ||||
| 						updateCoreProductAttr({ | ||||
| 							...this.dataForm, | ||||
| 							productId: this.productId, | ||||
| 						}).then((response) => { | ||||
| 							this.$modal.msgSuccess('修改成功'); | ||||
| 							this.visible = false; | ||||
| 							this.$emit('refreshDataList'); | ||||
| 						}); | ||||
| 						return; | ||||
| 					} | ||||
| 					// 添加的提交 | ||||
| 					createCoreProductAttr({ | ||||
| 						...this.dataForm, | ||||
| 						productId: this.productId, | ||||
| 					}).then((response) => { | ||||
| 						this.$modal.msgSuccess('新增成功'); | ||||
| 						this.visible = false; | ||||
| 						this.$emit('refreshDataList'); | ||||
| 					}); | ||||
| 				} | ||||
| 			}); | ||||
| 		}, | ||||
| 	}, | ||||
| }; | ||||
| </script> | ||||
|  | ||||
| <style scoped> | ||||
| .dialog >>> .el-dialog__body { | ||||
| 	padding: 30px 24px; | ||||
| } | ||||
| .dialog >>> .el-dialog__header { | ||||
| 	font-size: 16px; | ||||
| 	color: rgba(0, 0, 0, 0.85); | ||||
| 	font-weight: 500; | ||||
| 	padding: 13px 24px; | ||||
| 	border-bottom: 1px solid #e9e9e9; | ||||
| } | ||||
| .dialog >>> .el-dialog__header .titleStyle::before { | ||||
| 	content: ''; | ||||
| 	display: inline-block; | ||||
| 	width: 4px; | ||||
| 	height: 16px; | ||||
| 	background-color: #0b58ff; | ||||
| 	border-radius: 1px; | ||||
| 	margin-right: 8px; | ||||
| 	position: relative; | ||||
| 	top: 2px; | ||||
| } | ||||
| </style> | ||||
| @@ -1,186 +0,0 @@ | ||||
| <template> | ||||
| 	<div class="app-container"> | ||||
| 		<search-bar | ||||
| 			:formConfigs="formConfig" | ||||
| 			ref="searchBarForm" | ||||
| 			@headBtnClick="buttonClick" /> | ||||
| 		<base-table | ||||
| 			v-loading="dataListLoading" | ||||
| 			:table-props="tableProps" | ||||
| 			:page="listQuery.pageNo" | ||||
| 			:limit="listQuery.pageSize" | ||||
| 			:table-data="tableData"> | ||||
| 			<method-btn | ||||
| 				v-if="tableBtn.length" | ||||
| 				slot="handleBtn" | ||||
| 				:width="120" | ||||
| 				label="操作" | ||||
| 				:method-list="tableBtn" | ||||
| 				@clickBtn="handleClick" /> | ||||
| 		</base-table> | ||||
| 		<pagination | ||||
| 			:limit.sync="listQuery.pageSize" | ||||
| 			:page.sync="listQuery.pageNo" | ||||
| 			:total="listQuery.total" | ||||
| 			@pagination="getDataList" /> | ||||
| 		<add-or-update | ||||
| 			v-if="addOrUpdateVisible" | ||||
| 			ref="addOrUpdate" | ||||
| 			@refreshDataList="successSubmit" /> | ||||
| 	</div> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import AddOrUpdate from './add-or-updata'; | ||||
| import basicPage from '../../core/mixins/basic-page'; | ||||
| import { parseTime } from '../../core/mixins/code-filter'; | ||||
| import { publicFormatter } from '@/utils/dict'; | ||||
| import { | ||||
| 	getCoreProductPage, | ||||
| 	deleteCoreProduct | ||||
| } from '@/api/base/coreProduct'; | ||||
|  | ||||
| const tableProps = [ | ||||
| 	{ | ||||
| 		prop: 'createTime', | ||||
| 		label: '添加时间', | ||||
| 		filter: parseTime | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'name', | ||||
| 		label: '产品名称' | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'code', | ||||
| 		label: '产品编码' | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'productType', | ||||
| 		label: '产品类型', | ||||
| 		filter: publicFormatter('product_type') | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'specifications', | ||||
| 		label: '规格' | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'unit', | ||||
| 		label: '单位', | ||||
| 		filter: publicFormatter('unit_dict') | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'remark', | ||||
| 		label: '备注', | ||||
| 	}, | ||||
| ]; | ||||
|  | ||||
| export default { | ||||
| 	mixins: [basicPage], | ||||
| 	data() { | ||||
| 		return { | ||||
| 			urlOptions: { | ||||
| 				getDataListURL: getCoreProductPage, | ||||
| 				deleteURL: deleteCoreProduct | ||||
| 			}, | ||||
| 			tableProps, | ||||
| 			tableBtn: [ | ||||
| 				this.$auth.hasPermi(`base:core-product:update`) | ||||
| 					? { | ||||
| 							type: 'edit', | ||||
| 							btnName: '编辑', | ||||
| 					  } | ||||
| 					: undefined, | ||||
| 					this.$auth.hasPermi(`base:core-product:detail`) | ||||
| 					? { | ||||
| 							type: 'detail', | ||||
| 							btnName: '查看详情', | ||||
| 					  } | ||||
| 					: undefined, | ||||
|           this.$auth.hasPermi(`base:core-product:delete`) | ||||
| 					? { | ||||
| 							type: 'delete', | ||||
| 							btnName: '删除', | ||||
| 					  } | ||||
| 					: undefined, | ||||
| 			].filter((v)=>v), | ||||
| 			tableData: [], | ||||
| 			formConfig: [ | ||||
| 				{ | ||||
| 					type: 'input', | ||||
| 					label: '工单名称', | ||||
| 					placeholder: '工单名称', | ||||
| 					param: 'name' | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'input', | ||||
| 					label: '产品编号', | ||||
| 					placeholder: '产品编号', | ||||
| 					param: 'code' | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'button', | ||||
| 					btnName: '查询', | ||||
| 					name: 'search', | ||||
| 					color: 'primary', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'separate', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: this.$auth.hasPermi('base:core-product:create') ? 'button' : '', | ||||
| 					btnName: '新增', | ||||
| 					name: 'add', | ||||
| 					color: 'success', | ||||
| 					plain: true | ||||
| 				}, | ||||
| 			], | ||||
| 		}; | ||||
| 	}, | ||||
| 	components: { | ||||
| 		AddOrUpdate | ||||
| 	}, | ||||
| 	created() {}, | ||||
| 	methods: { | ||||
| 		// 查看详情 | ||||
| 		otherMethods(val) { | ||||
| 			if (val.type === 'detail') { | ||||
| 				this.addOrUpdateVisible = true; | ||||
|         this.addOrEditTitle = "详情"; | ||||
|         this.$nextTick(() => { | ||||
|           this.$refs.addOrUpdate.init(val.data.id, true); | ||||
|         }); | ||||
| 			} | ||||
| 		}, | ||||
| 		buttonClick(val) { | ||||
| 			switch (val.btnName) { | ||||
| 				case 'search': | ||||
| 					this.listQuery.pageNo = 1; | ||||
| 					this.listQuery.pageSize = 10; | ||||
| 					this.listQuery.name = val.name ? val.name : undefined; | ||||
| 					this.listQuery.code = val.code ? val.code : undefined; | ||||
| 					this.getDataList(); | ||||
| 					break; | ||||
| 				case 'reset': | ||||
| 					this.$refs.searchBarForm.resetForm(); | ||||
| 					this.listQuery = { | ||||
| 						pageSize: 10, | ||||
| 						pageNo: 1, | ||||
| 						total: 1, | ||||
| 					}; | ||||
| 					this.getDataList(); | ||||
| 					break; | ||||
| 				case 'add': | ||||
| 					this.addOrEditTitle = '新增'; | ||||
| 					this.addOrUpdateVisible = true; | ||||
| 					this.addOrUpdateHandle(); | ||||
| 					break; | ||||
| 				case 'export': | ||||
| 					this.handleExport(); | ||||
| 					break; | ||||
| 				default: | ||||
| 					console.log(val); | ||||
| 			} | ||||
| 		}, | ||||
| 	}, | ||||
| }; | ||||
| </script> | ||||
| @@ -1,114 +0,0 @@ | ||||
| <!-- | ||||
|  * @Author: zwq | ||||
|  * @Date: 2021-11-18 14:16:25 | ||||
|  * @LastEditors: DY | ||||
|  * @LastEditTime: 2023-11-03 19:28:06 | ||||
|  * @Description: | ||||
| --> | ||||
| <template> | ||||
| 	<el-form | ||||
| 		:model="dataForm" | ||||
| 		:rules="dataRule" | ||||
| 		ref="dataForm" | ||||
| 		@keyup.enter.native="dataFormSubmit()" | ||||
| 		label-width="80px"> | ||||
| 		<el-row :gutter="20"> | ||||
| 			<el-col :span="12"> | ||||
| 				<el-form-item label="产线名称" prop="name"> | ||||
| 					<el-input v-model="dataForm.name" clearable placeholder="请输入产线名称" /> | ||||
| 				</el-form-item> | ||||
| 			</el-col> | ||||
| 			<el-col :span="12"> | ||||
| 				<el-form-item label="产线编号" prop="code"> | ||||
| 					<el-input v-model="dataForm.code" clearable placeholder="请输入产线编号" /> | ||||
| 				</el-form-item> | ||||
| 			</el-col> | ||||
| 		</el-row> | ||||
| 		<el-row :gutter="20"> | ||||
| 			<el-col :span="12"> | ||||
| 				<el-form-item label="工厂名称" prop="factoryId"> | ||||
| 					<el-select | ||||
| 						v-model="dataForm.factoryId" | ||||
| 						filterable | ||||
| 						placeholder="请选择工厂"> | ||||
| 						<el-option | ||||
| 							v-for="dict in factoryList" | ||||
| 							:key="dict.id" | ||||
| 							:label="dict.name" | ||||
| 							:value="dict.id" /> | ||||
| 					</el-select> | ||||
| 				</el-form-item> | ||||
| 			</el-col> | ||||
| 			<el-col :span="12"> | ||||
| 				<el-form-item label="产线TT值(h)" prop="tvalue"> | ||||
| 					<el-input | ||||
| 						v-model.number="dataForm.tvalue" | ||||
| 						type="number" | ||||
| 						placeholder="TT值" /> | ||||
| 				</el-form-item> | ||||
| 			</el-col> | ||||
| 		</el-row> | ||||
| 		<el-row :gutter="20"> | ||||
| 			<el-col :span="12"> | ||||
| 				<el-form-item label="描述信息" prop="description"> | ||||
| 					<el-input | ||||
| 						v-model="dataForm.description" | ||||
| 						placeholder="请输入描述信息" /> | ||||
| 				</el-form-item> | ||||
| 			</el-col> | ||||
| 			<el-col :span="12"> | ||||
| 				<el-form-item label="备注" prop="remark"> | ||||
| 					<el-input | ||||
| 						v-model="dataForm.remark" | ||||
| 						placeholder="请输入备注" /> | ||||
| 				</el-form-item> | ||||
| 			</el-col> | ||||
| 		</el-row> | ||||
| 	</el-form> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import basicAdd from '../../core/mixins/basic-add'; | ||||
| import { createCorePL, updateCorePL, getCorePL, getCode } from "@/api/base/coreProductionLine"; | ||||
| import { getFactoryList } from '@/api/core/base/factory'; | ||||
|  | ||||
| export default { | ||||
| 	mixins: [basicAdd], | ||||
| 	data() { | ||||
| 		return { | ||||
| 			urlOptions: { | ||||
| 			  isGetCode: true, | ||||
|         codeURL: getCode, | ||||
| 				createURL: createCorePL, | ||||
| 				updateURL: updateCorePL, | ||||
| 				infoURL: getCorePL, | ||||
| 			}, | ||||
| 			dataForm: { | ||||
|         id: undefined, | ||||
|         code: undefined, | ||||
|         name: undefined, | ||||
|         description: undefined, | ||||
| 				tvalue: 0, | ||||
| 				factoryId: undefined, | ||||
|         remark: undefined, | ||||
| 			}, | ||||
| 			factoryList: [], | ||||
| 			dataRule: { | ||||
|         code: [{ required: true, message: "专业编码不能为空", trigger: "blur" }], | ||||
|         name: [{ required: true, message: "专业名称不能为空", trigger: "blur" }], | ||||
| 				factoryId: [{ required: true, message: "工厂不能为空", trigger: "blur" }] | ||||
|       } | ||||
| 		}; | ||||
| 	}, | ||||
| 	mounted() { | ||||
| 		this.getDict() | ||||
| 	}, | ||||
| 	methods: { | ||||
| 		async getDict() { | ||||
| 			// 工厂列表 | ||||
| 			const factoryRes = await getFactoryList(); | ||||
| 			this.factoryList = factoryRes.data; | ||||
| 		}, | ||||
| 	} | ||||
| }; | ||||
| </script> | ||||
| @@ -1,177 +0,0 @@ | ||||
| <template> | ||||
| 	<div class="app-container"> | ||||
| 		<search-bar | ||||
| 			:formConfigs="formConfig" | ||||
| 			ref="searchBarForm" | ||||
| 			@headBtnClick="buttonClick" /> | ||||
| 		<base-table | ||||
| 			v-loading="dataListLoading" | ||||
| 			:table-props="tableProps" | ||||
| 			:page="listQuery.pageNo" | ||||
| 			:limit="listQuery.pageSize" | ||||
| 			:table-data="tableData"> | ||||
| 			<method-btn | ||||
| 				v-if="tableBtn.length" | ||||
| 				slot="handleBtn" | ||||
| 				:width="120" | ||||
| 				label="操作" | ||||
| 				:method-list="tableBtn" | ||||
| 				@clickBtn="handleClick" /> | ||||
| 		</base-table> | ||||
| 		<pagination | ||||
| 			:limit.sync="listQuery.pageSize" | ||||
| 			:page.sync="listQuery.pageNo" | ||||
| 			:total="listQuery.total" | ||||
| 			@pagination="getDataList" /> | ||||
| 		<base-dialog | ||||
| 			:dialogTitle="addOrEditTitle" | ||||
| 			:dialogVisible="addOrUpdateVisible" | ||||
| 			@cancel="handleCancel" | ||||
| 			@confirm="handleConfirm" | ||||
| 			:before-close="handleCancel" | ||||
| 			width="50%"> | ||||
| 			<add-or-update | ||||
| 				ref="addOrUpdate" | ||||
| 				@refreshDataList="successSubmit"></add-or-update> | ||||
| 		</base-dialog> | ||||
| 	</div> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import AddOrUpdate from './add-or-updata'; | ||||
| import basicPage from '../../core/mixins/basic-page'; | ||||
| import { parseTime } from '../../core/mixins/code-filter'; | ||||
| import { | ||||
| 	getCorePLPage, | ||||
| 	deleteCorePL | ||||
| } from '@/api/base/coreProductionLine'; | ||||
|  | ||||
| const tableProps = [ | ||||
| 	{ | ||||
| 		prop: 'createTime', | ||||
| 		label: '添加时间', | ||||
| 		filter: parseTime | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'factoryName', | ||||
| 		label: '工厂' | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'name', | ||||
| 		label: '产线名称' | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'code', | ||||
| 		label: '产线编码' | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'enabled', | ||||
| 		label: '当前状态', | ||||
| 		filter: (val) => ['停用', '启用'][val] | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'description', | ||||
| 		label: '描述' | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'remark', | ||||
| 		label: '备注' | ||||
| 	}, | ||||
| ]; | ||||
|  | ||||
| export default { | ||||
| 	mixins: [basicPage], | ||||
| 	data() { | ||||
| 		return { | ||||
| 			urlOptions: { | ||||
| 				getDataListURL: getCorePLPage, | ||||
| 				deleteURL: deleteCorePL | ||||
| 			}, | ||||
| 			tableProps, | ||||
| 			tableBtn: [ | ||||
| 				this.$auth.hasPermi(`base:core-production-line:update`) | ||||
| 					? { | ||||
| 							type: 'edit', | ||||
| 							btnName: '编辑', | ||||
| 					  } | ||||
| 					: undefined, | ||||
|           this.$auth.hasPermi(`base:core-production-line:delete`) | ||||
| 					? { | ||||
| 							type: 'delete', | ||||
| 							btnName: '删除', | ||||
| 					  } | ||||
| 					: undefined, | ||||
| 			].filter((v)=>v), | ||||
| 			tableData: [], | ||||
| 			formConfig: [ | ||||
| 				{ | ||||
| 					type: 'input', | ||||
| 					label: '产线名称', | ||||
| 					placeholder: '产线名称', | ||||
| 					param: 'name' | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'button', | ||||
| 					btnName: '查询', | ||||
| 					name: 'search', | ||||
| 					color: 'primary', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'separate', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: this.$auth.hasPermi('base:core-production-line:create') ? 'button' : '', | ||||
| 					btnName: '新增', | ||||
| 					name: 'add', | ||||
| 					color: 'success', | ||||
| 					plain: true | ||||
| 				}, | ||||
| 			], | ||||
| 		}; | ||||
| 	}, | ||||
| 	components: { | ||||
| 		AddOrUpdate, | ||||
| 	}, | ||||
| 	created() {}, | ||||
| 	methods: { | ||||
| 		// 获取数据列表 | ||||
|     // getDataList() { | ||||
|     //   this.dataListLoading = true; | ||||
|     //   this.urlOptions.getDataListURL(this.listQuery).then(response => { | ||||
|     //     this.tableData = response.data.list; | ||||
|     //     this.listQuery.total = response.data.total; | ||||
|     //     this.dataListLoading = false; | ||||
|     //   }); | ||||
|     // }, | ||||
| 		buttonClick(val) { | ||||
| 			switch (val.btnName) { | ||||
| 				case 'search': | ||||
| 					this.listQuery.pageNo = 1; | ||||
| 					this.listQuery.pageSize = 10; | ||||
| 					this.listQuery.name = val.name ? val.name : undefined; | ||||
| 					this.getDataList(); | ||||
| 					break; | ||||
| 				case 'reset': | ||||
| 					this.$refs.searchBarForm.resetForm(); | ||||
| 					this.listQuery = { | ||||
| 						pageSize: 10, | ||||
| 						pageNo: 1, | ||||
| 						total: 1, | ||||
| 					}; | ||||
| 					this.getDataList(); | ||||
| 					break; | ||||
| 				case 'add': | ||||
| 					this.addOrEditTitle = '新增'; | ||||
| 					this.addOrUpdateVisible = true; | ||||
| 					this.addOrUpdateHandle(); | ||||
| 					break; | ||||
| 				case 'export': | ||||
| 					this.handleExport(); | ||||
| 					break; | ||||
| 				default: | ||||
| 					console.log(val); | ||||
| 			} | ||||
| 		}, | ||||
| 	}, | ||||
| }; | ||||
| </script> | ||||
| @@ -1,103 +0,0 @@ | ||||
| <!-- | ||||
|  * @Author: zwq | ||||
|  * @Date: 2021-11-18 14:16:25 | ||||
|  * @LastEditors: DY | ||||
|  * @LastEditTime: 2023-11-03 11:00:47 | ||||
|  * @Description: | ||||
| --> | ||||
| <template> | ||||
| 	<el-form | ||||
| 		:model="dataForm" | ||||
| 		:rules="dataRule" | ||||
| 		ref="dataForm" | ||||
| 		@keyup.enter.native="dataFormSubmit()" | ||||
| 		label-width="100px"> | ||||
| 		<el-row :gutter="20"> | ||||
| 			<el-col :span="12"> | ||||
| 				<el-form-item label="供应商编号" prop="code"> | ||||
| 					<el-input v-model="dataForm.code" clearable placeholder="请输入供应商编号" /> | ||||
| 				</el-form-item> | ||||
| 			</el-col> | ||||
| 			<el-col :span="12"> | ||||
| 				<el-form-item label="供应商名称" prop="name"> | ||||
| 					<el-input v-model="dataForm.name" clearable placeholder="请输入供应商名称" /> | ||||
| 				</el-form-item> | ||||
| 			</el-col> | ||||
| 		</el-row> | ||||
| 		<el-row :gutter="20"> | ||||
| 			<el-col :span="12"> | ||||
| 				<el-form-item label="联系人" prop="contact"> | ||||
| 					<el-input v-model="dataForm.contact" clearable placeholder="请输入联系人" /> | ||||
| 				</el-form-item> | ||||
| 			</el-col> | ||||
| 			<el-col :span="12"> | ||||
| 				<el-form-item label="联系电话" prop="telephone"> | ||||
| 					<el-input | ||||
| 						v-model="dataForm.telephone" | ||||
| 						maxlength="11" | ||||
| 						placeholder="请输入联系电话" /> | ||||
| 				</el-form-item> | ||||
| 			</el-col> | ||||
| 		</el-row> | ||||
| 		<el-form-item label="地址" prop="address"> | ||||
| 			<el-input | ||||
| 				v-model="dataForm.address" | ||||
| 				placeholder="请输入地址" /> | ||||
| 		</el-form-item> | ||||
| 		<el-form-item label="备注" prop="remark"> | ||||
| 			<el-input | ||||
| 				v-model="dataForm.remark" | ||||
| 				placeholder="请输入备注" /> | ||||
| 		</el-form-item> | ||||
| 	</el-form> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import basicAdd from '../../core/mixins/basic-add'; | ||||
| import { createCoreSupplier, updateCoreSupplier, getCoreSupplier, getCode } from "@/api/base/coreSupplier"; | ||||
|  | ||||
| export default { | ||||
| 	mixins: [basicAdd], | ||||
| 	data() { | ||||
| 		return { | ||||
| 			urlOptions: { | ||||
| 			  isGetCode: true, | ||||
|         codeURL: getCode, | ||||
| 				createURL: createCoreSupplier, | ||||
| 				updateURL: updateCoreSupplier, | ||||
| 				infoURL: getCoreSupplier | ||||
| 			}, | ||||
| 			dataForm: { | ||||
|         id: undefined, | ||||
|         code: undefined, | ||||
|         name: undefined, | ||||
|         telephone: undefined, | ||||
| 				contact: undefined, | ||||
| 				address: undefined, | ||||
|         remark: undefined | ||||
| 			}, | ||||
| 			dataRule: { | ||||
|         code: [{ required: true, message: "专业编码不能为空", trigger: "blur" }], | ||||
|         name: [{ required: true, message: "专业名称不能为空", trigger: "blur" }], | ||||
| 				contact: [{ required: true, message: "联系人不能为空", trigger: "blur" }], | ||||
| 				telephone: [ | ||||
| 					{ required: false, trigger: "blur", message: "手机号不能为空" }, | ||||
|           { | ||||
|             validator: function (rule, value, callback) { | ||||
| 							if (value) { | ||||
| 								if (/^(?:(?:\+|00)86)?1(?:3[\d]|4[5-79]|5[0-35-9]|6[5-7]|7[0-8]|8[\d]|9[189])\d{8}$/.test(value) === false) { | ||||
| 									callback(new Error("手机号格式错误")); | ||||
| 								} | ||||
| 							} else { | ||||
|                 callback(); | ||||
|               } | ||||
|             }, trigger: "blur" | ||||
|           } | ||||
|         ] | ||||
|       } | ||||
| 		}; | ||||
| 	}, | ||||
| 	mounted() {}, | ||||
| 	methods: {} | ||||
| }; | ||||
| </script> | ||||
| @@ -1,176 +0,0 @@ | ||||
| <template> | ||||
| 	<div class="app-container"> | ||||
| 		<search-bar | ||||
| 			:formConfigs="formConfig" | ||||
| 			ref="searchBarForm" | ||||
| 			@headBtnClick="buttonClick" /> | ||||
| 		<base-table | ||||
| 			v-loading="dataListLoading" | ||||
| 			:table-props="tableProps" | ||||
| 			:page="listQuery.pageNo" | ||||
| 			:limit="listQuery.pageSize" | ||||
| 			:table-data="tableData"> | ||||
| 			<method-btn | ||||
| 				v-if="tableBtn.length" | ||||
| 				slot="handleBtn" | ||||
| 				:width="120" | ||||
| 				label="操作" | ||||
| 				:method-list="tableBtn" | ||||
| 				@clickBtn="handleClick" /> | ||||
| 		</base-table> | ||||
| 		<pagination | ||||
| 			:limit.sync="listQuery.pageSize" | ||||
| 			:page.sync="listQuery.pageNo" | ||||
| 			:total="listQuery.total" | ||||
| 			@pagination="getDataList" /> | ||||
| 		<base-dialog | ||||
| 			:dialogTitle="addOrEditTitle" | ||||
| 			:dialogVisible="addOrUpdateVisible" | ||||
| 			@cancel="handleCancel" | ||||
| 			@confirm="handleConfirm" | ||||
| 			:before-close="handleCancel" | ||||
| 			width="50%"> | ||||
| 			<add-or-update | ||||
| 				ref="addOrUpdate" | ||||
| 				@refreshDataList="successSubmit"></add-or-update> | ||||
| 		</base-dialog> | ||||
| 	</div> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import AddOrUpdate from './add-or-updata'; | ||||
| import basicPage from '../../core/mixins/basic-page'; | ||||
| import { parseTime } from '../../core/mixins/code-filter'; | ||||
| import { | ||||
| 	getCoreSupplierPage, | ||||
| 	deleteCoreSupplier | ||||
| } from '@/api/base/coreSupplier'; | ||||
|  | ||||
| const tableProps = [ | ||||
| 	{ | ||||
| 		prop: 'createTime', | ||||
| 		label: '添加时间', | ||||
| 		filter: parseTime | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'code', | ||||
| 		label: '供应商编码' | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'name', | ||||
| 		label: '供应商名称' | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'contact', | ||||
| 		label: '联系人' | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'telephone', | ||||
| 		label: '联系电话' | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'address', | ||||
| 		label: '地址' | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'remark', | ||||
| 		label: '备注' | ||||
| 	}, | ||||
| ]; | ||||
|  | ||||
| export default { | ||||
| 	mixins: [basicPage], | ||||
| 	data() { | ||||
| 		return { | ||||
| 			urlOptions: { | ||||
| 				getDataListURL: getCoreSupplierPage, | ||||
| 				deleteURL: deleteCoreSupplier | ||||
| 			}, | ||||
| 			tableProps, | ||||
| 			tableBtn: [ | ||||
| 				this.$auth.hasPermi(`base:core-supplier:update`) | ||||
| 					? { | ||||
| 							type: 'edit', | ||||
| 							btnName: '编辑', | ||||
| 					  } | ||||
| 					: undefined, | ||||
|           this.$auth.hasPermi(`base:core-supplier:delete`) | ||||
| 					? { | ||||
| 							type: 'delete', | ||||
| 							btnName: '删除', | ||||
| 					  } | ||||
| 					: undefined, | ||||
| 			].filter((v)=>v), | ||||
| 			tableData: [], | ||||
| 			formConfig: [ | ||||
| 				{ | ||||
| 					type: 'input', | ||||
| 					label: '关键字', | ||||
| 					placeholder: '供应商名称', | ||||
| 					param: 'name', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'button', | ||||
| 					btnName: '查询', | ||||
| 					name: 'search', | ||||
| 					color: 'primary', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'separate', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: this.$auth.hasPermi('base:core-supplier:create') ? 'button' : '', | ||||
| 					btnName: '新增', | ||||
| 					name: 'add', | ||||
| 					color: 'success', | ||||
| 					plain: true | ||||
| 				}, | ||||
| 			], | ||||
| 		}; | ||||
| 	}, | ||||
| 	components: { | ||||
| 		AddOrUpdate, | ||||
| 	}, | ||||
| 	created() {}, | ||||
| 	methods: { | ||||
| 		// 获取数据列表 | ||||
|     // getDataList() { | ||||
|     //   this.dataListLoading = true; | ||||
|     //   this.urlOptions.getDataListURL(this.listQuery).then(response => { | ||||
|     //     this.tableData = response.data.list; | ||||
|     //     this.listQuery.total = response.data.total; | ||||
|     //     this.dataListLoading = false; | ||||
|     //   }); | ||||
|     // }, | ||||
| 		buttonClick(val) { | ||||
| 			switch (val.btnName) { | ||||
| 				case 'search': | ||||
| 					this.listQuery.pageNo = 1; | ||||
| 					this.listQuery.pageSize = 10; | ||||
| 					this.listQuery.name = val.name ? val.name : undefined; | ||||
| 					this.getDataList(); | ||||
| 					break; | ||||
| 				case 'reset': | ||||
| 					this.$refs.searchBarForm.resetForm(); | ||||
| 					this.listQuery = { | ||||
| 						pageSize: 10, | ||||
| 						pageNo: 1, | ||||
| 						total: 1, | ||||
| 					}; | ||||
| 					this.getDataList(); | ||||
| 					break; | ||||
| 				case 'add': | ||||
| 					this.addOrEditTitle = '新增'; | ||||
| 					this.addOrUpdateVisible = true; | ||||
| 					this.addOrUpdateHandle(); | ||||
| 					break; | ||||
| 				case 'export': | ||||
| 					this.handleExport(); | ||||
| 					break; | ||||
| 				default: | ||||
| 					console.log(val); | ||||
| 			} | ||||
| 		}, | ||||
| 	}, | ||||
| }; | ||||
| </script> | ||||
| @@ -1,65 +0,0 @@ | ||||
| <!-- | ||||
|  * @Author: zwq | ||||
|  * @Date: 2023-08-01 15:27:31 | ||||
|  * @LastEditors: zwq | ||||
|  * @LastEditTime: 2023-08-01 16:25:54 | ||||
|  * @Description: | ||||
| --> | ||||
| <template> | ||||
| 	<div :class="[className, { 'p-0': noPadding }]"> | ||||
| 		<slot /> | ||||
| 	</div> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| export default { | ||||
| 	props: { | ||||
| 		size: { | ||||
| 			// 取值范围:  xl lg md sm | ||||
| 			type: String, | ||||
| 			default: 'de', | ||||
| 			validator: function (val) { | ||||
| 				return ['xl', 'lg', 'de', 'md', 'sm'].indexOf(val) !== -1; | ||||
| 			}, | ||||
| 		}, | ||||
| 		noPadding: { | ||||
| 			type: Boolean, | ||||
| 			default: false, | ||||
| 		}, | ||||
| 	}, | ||||
| 	computed: { | ||||
| 		className: function () { | ||||
| 			return `${this.size}-title`; | ||||
| 		}, | ||||
| 	}, | ||||
| }; | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
| $pxls: (xl, 28px) (lg, 24px) (de, 20px) (md, 18px) (sm, 16px); | ||||
| $mgr: 8px; | ||||
| @each $size, $height in $pxls { | ||||
| 	.#{$size}-title { | ||||
| 		font-size: 18px; | ||||
| 		line-height: $height; | ||||
| 		color: #000; | ||||
| 		font-weight: 500; | ||||
| 		font-family: '微软雅黑', 'Microsoft YaHei', Arial, Helvetica, sans-serif; | ||||
|  | ||||
| 		&::before { | ||||
| 			content: ''; | ||||
| 			display: inline-block; | ||||
| 			vertical-align: top; | ||||
| 			width: 4px; | ||||
| 			height: $height + 2px; | ||||
| 			border-radius: 1px; | ||||
| 			margin-right: $mgr; | ||||
| 			background-color: #0b58ff; | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
|  | ||||
| .p-0 { | ||||
| 	padding: 0; | ||||
| } | ||||
| </style> | ||||
| @@ -1,416 +0,0 @@ | ||||
| <!-- | ||||
|  * @Author: zwq | ||||
|  * @Date: 2021-11-18 14:16:25 | ||||
|  * @LastEditors: DY | ||||
|  * @LastEditTime: 2023-11-04 11:39:25 | ||||
|  * @Description: | ||||
| --> | ||||
| <template> | ||||
| 	<el-drawer | ||||
| 		:visible.sync="visible" | ||||
| 		:show-close="false" | ||||
| 		:wrapper-closable="false" | ||||
| 		class="drawer" | ||||
| 		size="50%"> | ||||
| 		<small-title slot="title" :no-padding="true"> | ||||
| 			{{ isdetail ? '详情' : !dataForm.id ? '新增' : '编辑' }} | ||||
| 		</small-title> | ||||
| 		<div class="content"> | ||||
| 			<div class="visual-part"> | ||||
| 				<el-form | ||||
| 					:model="dataForm" | ||||
| 					:rules="dataRule" | ||||
| 					ref="dataForm" | ||||
| 					@keyup.enter.native="dataFormSubmit()" | ||||
| 					label-width="100px" | ||||
| 					label-position="top"> | ||||
| 					<el-row :gutter="20"> | ||||
| 						<el-col :span="12"> | ||||
| 							<el-form-item label="产品名称" prop="name"> | ||||
| 								<el-input v-model="dataForm.name" :disabled="isdetail" clearable placeholder="请输入产品名称" /> | ||||
| 							</el-form-item> | ||||
| 						</el-col> | ||||
| 						<el-col :span="12"> | ||||
| 							<el-form-item label="产品编码" prop="code"> | ||||
| 								<el-input | ||||
| 									v-model="dataForm.code" | ||||
| 									clearable | ||||
| 									:disabled="isdetail" | ||||
| 									placeholder="请输入产品编码" /> | ||||
| 							</el-form-item> | ||||
| 						</el-col> | ||||
| 					</el-row> | ||||
| 					<el-row :gutter="20"> | ||||
| 						<el-col :span="12"> | ||||
| 							<el-form-item label="物料类型" prop="materialType"> | ||||
| 								<el-select | ||||
| 									v-model="dataForm.materialType" | ||||
| 									filterable | ||||
| 									:disabled="isdetail" | ||||
| 									style="width: 100%" | ||||
| 									placeholder="请选择物料类型"> | ||||
| 									<el-option | ||||
| 										v-for="dict in this.getDictDatas('material_type')" | ||||
| 										:key="dict.value" | ||||
| 										:label="dict.label" | ||||
| 										:value="dict.value" /> | ||||
| 								</el-select> | ||||
| 							</el-form-item> | ||||
| 						</el-col> | ||||
| 						<el-col :span="12"> | ||||
| 							<el-form-item label="产品类型" prop="productType"> | ||||
| 								<el-select | ||||
| 									v-model="dataForm.productType" | ||||
| 									filterable | ||||
| 									:disabled="isdetail" | ||||
| 									style="width: 100%" | ||||
| 									placeholder="请选择产品类型"> | ||||
| 									<el-option | ||||
| 										v-for="dict in this.getDictDatas(DICT_TYPE.PRODUCT_TYPE)" | ||||
| 										:key="dict.value" | ||||
| 										:label="dict.label" | ||||
| 										:value="dict.value" /> | ||||
| 								</el-select> | ||||
| 							</el-form-item> | ||||
| 						</el-col> | ||||
| 					</el-row> | ||||
| 					<el-row :gutter="20"> | ||||
| 						<el-col :span="12"> | ||||
| 							<el-form-item label="单位" prop="unit"> | ||||
| 								<el-select | ||||
| 									v-model="dataForm.unit" | ||||
| 									filterable | ||||
| 									:disabled="isdetail" | ||||
| 									style="width: 100%" | ||||
| 									placeholder="请选择单位"> | ||||
| 									<el-option | ||||
| 										v-for="dict in this.getDictDatas(DICT_TYPE.UNIT_DICT)" | ||||
| 										:key="dict.value" | ||||
| 										:label="dict.label" | ||||
| 										:value="dict.value" /> | ||||
| 								</el-select> | ||||
| 							</el-form-item> | ||||
| 						</el-col> | ||||
| 						<el-col :span="12"> | ||||
| 							<el-form-item label="单位平方数" prop="area"> | ||||
| 								<el-input-number v-model="dataForm.area" :precision="2" style="width: 100%" :disabled="isdetail" clearable placeholder="请输入单位平方数" /> | ||||
| 							</el-form-item> | ||||
| 						</el-col> | ||||
| 					</el-row> | ||||
| 					<el-row :gutter="20"> | ||||
| 						<el-col :span="12"> | ||||
| 							<el-form-item label="规格" prop="specifications"> | ||||
| 								<el-input v-model="dataForm.specifications" :disabled="isdetail" clearable placeholder="请输入规格" /> | ||||
| 							</el-form-item> | ||||
| 						</el-col> | ||||
| 						<el-col :span="12"> | ||||
| 							<el-form-item label="产线生产单位用时(S)" prop="processTime"> | ||||
| 								<el-input v-model.number="dataForm.processTime" type="number" :disabled="isdetail" clearable placeholder="请输入产线生产单位用时" /> | ||||
| 							</el-form-item> | ||||
| 						</el-col> | ||||
| 					</el-row> | ||||
| 					<el-form-item label="备注" prop="remark"> | ||||
| 						<el-input v-model="dataForm.remark" :disabled="isdetail" clearable placeholder="请输入备注" /> | ||||
| 					</el-form-item> | ||||
| 				</el-form> | ||||
| 			</div> | ||||
| 			<div class="drawer-body__footer"> | ||||
| 				<el-button style="" @click="goback()">取消</el-button> | ||||
| 				<el-button v-if="isdetail" type="primary" @click="goEdit()"> | ||||
| 					编辑 | ||||
| 				</el-button> | ||||
| 				<el-button v-else type="primary" @click="dataFormSubmit()">确定</el-button> | ||||
| 			</div> | ||||
|  | ||||
| 			<div class="attr-list" v-if="idAttrShow"> | ||||
| 				<small-title | ||||
| 					style="margin: 16px 0; padding-left: 8px" | ||||
| 					:no-padding="true"> | ||||
| 					产品属性 | ||||
| 				</small-title> | ||||
|  | ||||
| 				<div v-if="!isdetail" class="action_btn"> | ||||
| 					<template> | ||||
| 						<span style="display: inline-block;" @click="addNew()"> | ||||
| 							<svg-icon style="width: 14px; height: 14px" class="item-icon" icon-class="table_add" /> | ||||
| 							<span class="add">添加</span> | ||||
| 						</span> | ||||
| 					</template> | ||||
| 				</div> | ||||
| 				<base-table | ||||
| 					:table-props="tableProps" | ||||
| 					:page="listQuery.pageNo" | ||||
| 					:limit="listQuery.pageSize" | ||||
| 					:table-data="productAttrList"> | ||||
| 					<method-btn | ||||
| 						v-if="!isdetail" | ||||
| 						slot="handleBtn" | ||||
| 						:width="120" | ||||
| 						label="操作" | ||||
| 						:method-list="tableBtn" | ||||
| 						@clickBtn="handleClick" /> | ||||
| 				</base-table> | ||||
| 				<pagination | ||||
| 					v-show="listQuery.total > 0" | ||||
| 					:total="listQuery.total" | ||||
| 					:page.sync="listQuery.pageNo" | ||||
| 					:limit.sync="listQuery.pageSize" | ||||
| 					:page-sizes="[5, 10, 15]" | ||||
| 					@pagination="getList" /> | ||||
| 			</div> | ||||
|  | ||||
| 			<div class="drawer-body__footer"> | ||||
| 				<el-button type="primary" @click="goback()">关闭</el-button> | ||||
| 			</div> | ||||
| 		</div> | ||||
|  | ||||
| 		<attr-add | ||||
| 			v-if="addOrUpdateVisible" | ||||
| 			ref="addOrUpdate" | ||||
| 			:product-id="dataForm.id" | ||||
| 			@refreshDataList="getList" /> | ||||
| 	</el-drawer> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import basicAdd from '../../core/mixins/basic-add'; | ||||
| import { createCoreProduct, updateCoreProduct, getCoreProduct, getCode, getCoreProductAttrPage, deleteCoreProductAttr } from "@/api/base/coreProduct"; | ||||
| import SmallTitle from './SmallTitle'; | ||||
| import { parseTime } from '../../core/mixins/code-filter'; | ||||
| import attrAdd from './attr-add'; | ||||
| import {DICT_TYPE, getDictDatas} from "@/utils/dict"; | ||||
|  | ||||
| const tableBtn = [ | ||||
| 	{ | ||||
| 		type: 'edit', | ||||
| 		btnName: '编辑', | ||||
| 	}, | ||||
| 	{ | ||||
| 		type: 'delete', | ||||
| 		btnName: '删除', | ||||
| 	}, | ||||
| ]; | ||||
| const tableProps = [ | ||||
| 	{ | ||||
| 		prop: 'createTime', | ||||
| 		label: '添加时间', | ||||
| 		filter: parseTime, | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'name', | ||||
| 		label: '属性名', | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'value', | ||||
| 		label: '属性值', | ||||
| 	}, | ||||
| ]; | ||||
|  | ||||
| const topBtnConfig = [ | ||||
|   { | ||||
|     type: 'add', | ||||
|     btnName: 'btn.add' | ||||
|   } | ||||
| ] | ||||
|  | ||||
| export default { | ||||
| 	mixins: [basicAdd], | ||||
| 	components: { SmallTitle, attrAdd }, | ||||
| 	data() { | ||||
| 		return { | ||||
| 			tableBtn, | ||||
| 			tableProps, | ||||
| 			topBtnConfig, | ||||
| 			addOrUpdateVisible: false, | ||||
| 			urlOptions: { | ||||
| 			  isGetCode: true, | ||||
|         codeURL: getCode, | ||||
| 				createURL: createCoreProduct, | ||||
| 				updateURL: updateCoreProduct, | ||||
| 				infoURL: getCoreProduct, | ||||
| 			}, | ||||
| 			listQuery: { | ||||
| 				pageSize: 10, | ||||
| 				pageNo: 1, | ||||
| 				total: 0, | ||||
| 			}, | ||||
| 			dataForm: { | ||||
|         id: undefined, | ||||
|         code: undefined, | ||||
|         name: '', | ||||
| 				materialType: undefined, | ||||
| 				productType: undefined, | ||||
|         area: undefined, | ||||
| 				specifications: undefined, | ||||
| 				processTime: 0, | ||||
|         remark: undefined, | ||||
| 				unit: undefined | ||||
| 			}, | ||||
| 			productAttrList: [], | ||||
| 			visible: false, | ||||
| 			isdetail: false, | ||||
| 			idAttrShow: false, | ||||
| 			dataRule: { | ||||
|         code: [{ required: true, message: "物料编码不能为空", trigger: "blur" }], | ||||
|         name: [{ required: true, message: "物料名称不能为空", trigger: "blur" }], | ||||
| 				materialType: [{ required: true, message: "物料类型不能为空", trigger: "change" }], | ||||
| 				productType: [{ required: true, message: "产品类型不能为空", trigger: "change" }], | ||||
| 				processTime: [{ required: true, message: "产线生产单位用时不能为空", trigger: "blur" }] | ||||
|       } | ||||
| 		}; | ||||
| 	}, | ||||
| 	mounted() {}, | ||||
| 	methods: { | ||||
| 		initData() { | ||||
| 			this.productAttrList.splice(0); | ||||
| 			this.listQuery.total = 0; | ||||
| 		}, | ||||
| 		handleClick(raw) { | ||||
| 			if (raw.type === 'delete') { | ||||
| 				this.$confirm( | ||||
| 					`确定对${ | ||||
| 						raw.data.attrName | ||||
| 							? '[名称=' + raw.data.attrName + ']' | ||||
| 							: '[序号=' + raw.data._pageIndex + ']' | ||||
| 					}进行删除操作?`, | ||||
| 					'提示', | ||||
| 					{ | ||||
| 						confirmButtonText: '确定', | ||||
| 						cancelButtonText: '取消', | ||||
| 						type: 'warning', | ||||
| 					} | ||||
| 				) | ||||
| 					.then(() => { | ||||
| 						deleteCoreProductAttr(raw.data.id).then(({ data }) => { | ||||
| 							this.$message({ | ||||
| 								message: '操作成功', | ||||
| 								type: 'success', | ||||
| 								duration: 1500, | ||||
| 								onClose: () => { | ||||
| 									this.getList(); | ||||
| 								}, | ||||
| 							}); | ||||
| 						}); | ||||
| 					}) | ||||
| 					.catch(() => {}); | ||||
| 			} else { | ||||
| 				this.addNew(raw.data.id); | ||||
| 			} | ||||
| 		}, | ||||
| 		getList() { | ||||
| 			// 获取产品属性列表 | ||||
| 			getCoreProductAttrPage({ | ||||
| 				...this.listQuery, | ||||
| 				productId: this.dataForm.id, | ||||
| 			}).then((response) => { | ||||
| 				this.productAttrList = response.data.list; | ||||
| 				this.listQuery.total = response.data.total; | ||||
| 			}); | ||||
| 		}, | ||||
| 		init(id, isdetail) { | ||||
| 			this.initData(); | ||||
| 			this.isdetail = isdetail || false; | ||||
| 			this.dataForm.id = id || undefined; | ||||
| 			this.visible = true; | ||||
| 			if (id) { | ||||
| 				this.idAttrShow = true | ||||
| 			} else { | ||||
| 				this.idAttrShow = false | ||||
| 			} | ||||
|  | ||||
| 			this.$nextTick(() => { | ||||
| 				this.$refs['dataForm'].resetFields(); | ||||
|  | ||||
| 				if (this.dataForm.id) { | ||||
| 					// 获取产品详情 | ||||
| 					this.urlOptions.infoURL(id).then(response => { | ||||
|             this.dataForm = response.data | ||||
| 						this.dataForm.unit = String(this.dataForm.unit) | ||||
| 						this.dataForm.materialType = String(this.dataForm.materialType) | ||||
| 						this.dataForm.productType = String(this.dataForm.productType) | ||||
|           }); | ||||
| 					// 获取产品属性列表 | ||||
| 					this.getList(); | ||||
| 				} else { | ||||
| 					if (this.urlOptions.isGetCode) { | ||||
|             this.getCode() | ||||
|           } | ||||
| 				} | ||||
| 			}); | ||||
| 		}, | ||||
| 		goback() { | ||||
| 			this.visible = false; | ||||
| 			this.$emit('refreshDataList'); | ||||
| 			// this.initData(); | ||||
| 		}, | ||||
| 		goEdit() { | ||||
| 			this.isdetail = false; | ||||
| 		}, | ||||
| 		// 新增 / 修改 | ||||
| 		addNew(id) { | ||||
| 			this.addOrUpdateVisible = true; | ||||
| 			this.$nextTick(() => { | ||||
| 				this.$refs.addOrUpdate.init(id); | ||||
| 			}); | ||||
| 		} | ||||
| 	} | ||||
| }; | ||||
| </script> | ||||
| <style scoped> | ||||
| .drawer >>> .el-drawer { | ||||
| 	border-radius: 8px 0 0 8px; | ||||
| 	display: flex; | ||||
| 	flex-direction: column; | ||||
| } | ||||
|  | ||||
| .drawer >>> .el-form-item__label { | ||||
| 	padding: 0; | ||||
| } | ||||
|  | ||||
| .drawer >>> .el-drawer__header { | ||||
| 	margin: 0; | ||||
| 	padding: 32px 32px 24px; | ||||
| 	border-bottom: 1px solid #dcdfe6; | ||||
| } | ||||
| .drawer >>> .el-drawer__body { | ||||
| 	flex: 1; | ||||
| 	height: 1px; | ||||
| 	display: flex; | ||||
| 	flex-direction: column; | ||||
| } | ||||
|  | ||||
| .drawer >>> .content { | ||||
| 	padding: 30px 24px; | ||||
| 	flex: 1; | ||||
| 	display: flex; | ||||
| 	flex-direction: column; | ||||
| 	/* height: 100%; */ | ||||
| } | ||||
|  | ||||
| .drawer >>> .visual-part { | ||||
| 	flex: 1 auto; | ||||
| 	max-height: 76vh; | ||||
| 	overflow: hidden; | ||||
| 	overflow-y: scroll; | ||||
| 	padding-right: 10px; /* 调整滚动条样式 */ | ||||
| } | ||||
|  | ||||
| .drawer >>> .el-form, | ||||
| .drawer >>> .attr-list { | ||||
| 	padding: 0 16px; | ||||
| } | ||||
|  | ||||
| .drawer-body__footer { | ||||
| 	display: flex; | ||||
| 	justify-content: flex-end; | ||||
| 	padding: 18px; | ||||
| } | ||||
| .action_btn { | ||||
|   float: right; | ||||
|   margin: 5px 15px; | ||||
|   font-size: 14px; | ||||
| } | ||||
| .add { | ||||
| 	color: #0b58ff; | ||||
| } | ||||
| </style> | ||||
| @@ -1,304 +0,0 @@ | ||||
| <!-- | ||||
|  * @Author: zwq | ||||
|  * @Date: 2021-11-18 14:16:25 | ||||
|  * @LastEditors: DY | ||||
|  * @LastEditTime: 2023-11-06 10:01:37 | ||||
|  * @Description: | ||||
| --> | ||||
| <template> | ||||
| 	<el-drawer | ||||
| 		:visible.sync="visible" | ||||
| 		:show-close="false" | ||||
| 		:wrapper-closable="false" | ||||
| 		class="drawer" | ||||
| 		size="50%"> | ||||
| 		<small-title slot="title" :no-padding="true"> | ||||
| 			{{ '预使用主原料信息' }} | ||||
| 		</small-title> | ||||
| 		<div class="content"> | ||||
| 			<div style="height: 15vh"> | ||||
| 				<div style="font-size: 18px;">工单名:{{ workOrderName }}</div> | ||||
| 			</div> | ||||
|  | ||||
| 			<div class="attr-list"> | ||||
| 				<small-title | ||||
| 					style="margin: 16px 0; padding-left: 8px" | ||||
| 					:no-padding="true"> | ||||
| 					批次信息 | ||||
| 				</small-title> | ||||
|  | ||||
| 				<div class="action_btn"> | ||||
| 					<template> | ||||
| 						<span style="display: inline-block;" @click="addNew()"> | ||||
| 							<svg-icon style="width: 14px; height: 14px" class="item-icon" icon-class="table_add" /> | ||||
| 							<span class="add">添加</span> | ||||
| 						</span> | ||||
| 					</template> | ||||
| 				</div> | ||||
| 				<base-table | ||||
| 					:table-props="tableProps" | ||||
| 					:page="listQuery.pageNo" | ||||
| 					:limit="listQuery.pageSize" | ||||
| 					:table-data="materialList"> | ||||
| 					<method-btn | ||||
| 						slot="handleBtn" | ||||
| 						:width="120" | ||||
| 						label="操作" | ||||
| 						:method-list="tableBtn" | ||||
| 						@clickBtn="handleClick" /> | ||||
| 				</base-table> | ||||
| 				<pagination | ||||
| 					v-show="listQuery.total > 0" | ||||
| 					:total="listQuery.total" | ||||
| 					:page.sync="listQuery.pageNo" | ||||
| 					:limit.sync="listQuery.pageSize" | ||||
| 					:page-sizes="[5, 10, 15]" | ||||
| 					@pagination="getList" /> | ||||
| 			</div> | ||||
|  | ||||
| 			<div class="drawer-body__footer"> | ||||
| 				<el-button type="primary" @click="goback()">关闭</el-button> | ||||
| 			</div> | ||||
| 		</div> | ||||
|  | ||||
| 		<attr-add | ||||
| 			v-if="addOrUpdateVisible" | ||||
| 			ref="addOrUpdate" | ||||
| 			:product-id="dataForm.id" | ||||
| 			@refreshDataList="getList" /> | ||||
| 	</el-drawer> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import basicAdd from '../../core/mixins/basic-add'; | ||||
| import { getCoreWOMaPage, deleteCoreWOMa } from "@/api/base/coreWorkOrder"; | ||||
| import SmallTitle from './SmallTitle'; | ||||
| import { parseTime } from '../../core/mixins/code-filter'; | ||||
| import attrAdd from './attr-add'; | ||||
| import { publicFormatter } from "@/utils/dict"; | ||||
|  | ||||
| const tableBtn = [ | ||||
| 		{ | ||||
| 			type: 'edit', | ||||
| 			btnName: '编辑', | ||||
| 		}, | ||||
| 		{ | ||||
| 			type: 'delete', | ||||
| 			btnName: '删除', | ||||
| 		} | ||||
| ]; | ||||
| const tableProps = [ | ||||
| 	{ | ||||
| 		prop: 'createTime', | ||||
| 		label: '添加时间', | ||||
| 		filter: parseTime, | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'material', | ||||
| 		label: '原料名称' | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'origin', | ||||
| 		label: '来源', | ||||
| 		filter: (val) => ['', '内部', '采购'][val] | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'supplierId', | ||||
| 		label: '供应商', | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'batch', | ||||
| 		label: '批次', | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'num', | ||||
| 		label: '数量', | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'unit', | ||||
| 		label: '单位', | ||||
| 		filter: publicFormatter('unit_dict') | ||||
| 	}, | ||||
| ]; | ||||
|  | ||||
| const topBtnConfig = [ | ||||
|   { | ||||
|     type: 'add', | ||||
|     btnName: 'btn.add' | ||||
|   } | ||||
| ] | ||||
|  | ||||
| export default { | ||||
| 	mixins: [basicAdd], | ||||
| 	components: { SmallTitle, attrAdd }, | ||||
| 	data() { | ||||
| 		return { | ||||
| 			tableBtn, | ||||
| 			tableProps, | ||||
| 			topBtnConfig, | ||||
| 			workOrderName: '111', | ||||
| 			addOrUpdateVisible: false, | ||||
| 			listQuery: { | ||||
| 				pageSize: 10, | ||||
| 				pageNo: 1, | ||||
| 				total: 0, | ||||
| 			}, | ||||
| 			dataForm: { | ||||
|         id: undefined | ||||
| 			}, | ||||
| 			materialList: [], | ||||
| 			visible: false, | ||||
| 			isdetail: false | ||||
| 		}; | ||||
| 	}, | ||||
| 	mounted() {}, | ||||
| 	methods: { | ||||
| 		initData() { | ||||
| 			this.materialList.splice(0); | ||||
| 			this.listQuery.total = 0; | ||||
| 		}, | ||||
| 		handleClick(raw) { | ||||
| 			if (raw.type === 'delete') { | ||||
| 				this.$confirm( | ||||
| 					`确定对${ | ||||
| 						raw.data.attrName | ||||
| 							? '[名称=' + raw.data.attrName + ']' | ||||
| 							: '[序号=' + raw.data._pageIndex + ']' | ||||
| 					}进行删除操作?`, | ||||
| 					'提示', | ||||
| 					{ | ||||
| 						confirmButtonText: '确定', | ||||
| 						cancelButtonText: '取消', | ||||
| 						type: 'warning', | ||||
| 					} | ||||
| 				) | ||||
| 					.then(() => { | ||||
| 						deleteCoreWOMa(raw.data.id).then(({ data }) => { | ||||
| 							this.$message({ | ||||
| 								message: '操作成功', | ||||
| 								type: 'success', | ||||
| 								duration: 1500, | ||||
| 								onClose: () => { | ||||
| 									this.getList(); | ||||
| 								}, | ||||
| 							}); | ||||
| 						}); | ||||
| 					}) | ||||
| 					.catch(() => {}); | ||||
| 			} else { | ||||
| 				this.addNew(raw.data.id); | ||||
| 			} | ||||
| 		}, | ||||
| 		getList() { | ||||
| 			// 获取预使用原料列表 | ||||
| 			getCoreWOMaPage({ | ||||
| 				...this.listQuery, | ||||
| 				workOrderId: this.dataForm.id, | ||||
| 			}).then((response) => { | ||||
| 				this.materialList = response.data.list; | ||||
| 				this.listQuery.total = response.data.total; | ||||
| 			}); | ||||
| 		}, | ||||
| 		init(id, isdetail) { | ||||
| 			this.initData(); | ||||
| 			this.isdetail = isdetail || false; | ||||
| 			this.dataForm.id = id || undefined; | ||||
| 			this.visible = true; | ||||
| 			this.getList() | ||||
|  | ||||
| 			// this.$nextTick(() => { | ||||
| 			// 	this.$refs['dataForm'].resetFields(); | ||||
|  | ||||
| 			// 	if (this.dataForm.id) { | ||||
| 			// 		// 获取产品详情 | ||||
| 			// 		this.urlOptions.infoURL(id).then(response => { | ||||
|       //       this.dataForm = response.data | ||||
| 			// 			this.dataForm.unit = String(this.dataForm.unit) | ||||
| 			// 			this.dataForm.materialType = String(this.dataForm.materialType) | ||||
| 			// 			this.dataForm.productType = String(this.dataForm.productType) | ||||
|       //     }); | ||||
| 			// 		// 获取产品属性列表 | ||||
| 			// 		this.getList(); | ||||
| 			// 	} else { | ||||
| 			// 		if (this.urlOptions.isGetCode) { | ||||
|       //       this.getCode() | ||||
|       //     } | ||||
| 			// 	} | ||||
| 			// }); | ||||
| 		}, | ||||
| 		goback() { | ||||
| 			this.visible = false; | ||||
| 			this.$emit('refreshDataList'); | ||||
| 			// this.initData(); | ||||
| 		}, | ||||
| 		goEdit() { | ||||
| 			this.isdetail = false; | ||||
| 		}, | ||||
| 		// 新增 / 修改 | ||||
| 		addNew(id) { | ||||
| 			this.addOrUpdateVisible = true; | ||||
| 			this.$nextTick(() => { | ||||
| 				this.$refs.addOrUpdate.init(id); | ||||
| 			}); | ||||
| 		} | ||||
| 	} | ||||
| }; | ||||
| </script> | ||||
| <style scoped> | ||||
| .drawer >>> .el-drawer { | ||||
| 	border-radius: 8px 0 0 8px; | ||||
| 	display: flex; | ||||
| 	flex-direction: column; | ||||
| } | ||||
|  | ||||
| .drawer >>> .el-form-item__label { | ||||
| 	padding: 0; | ||||
| } | ||||
|  | ||||
| .drawer >>> .el-drawer__header { | ||||
| 	margin: 0; | ||||
| 	padding: 32px 32px 24px; | ||||
| 	border-bottom: 1px solid #dcdfe6; | ||||
| } | ||||
| .drawer >>> .el-drawer__body { | ||||
| 	flex: 1; | ||||
| 	height: 1px; | ||||
| 	display: flex; | ||||
| 	flex-direction: column; | ||||
| } | ||||
|  | ||||
| .drawer >>> .content { | ||||
| 	padding: 30px 24px; | ||||
| 	flex: 1; | ||||
| 	display: flex; | ||||
| 	flex-direction: column; | ||||
| 	/* height: 100%; */ | ||||
| } | ||||
|  | ||||
| .drawer >>> .visual-part { | ||||
| 	flex: 1 auto; | ||||
| 	/* max-height: 76vh; */ | ||||
| 	overflow: hidden; | ||||
| 	overflow-y: scroll; | ||||
| 	padding-right: 10px; /* 调整滚动条样式 */ | ||||
| } | ||||
|  | ||||
| .drawer >>> .el-form, | ||||
| .drawer >>> .attr-list { | ||||
| 	padding: 0 16px; | ||||
| } | ||||
|  | ||||
| .drawer-body__footer { | ||||
| 	display: flex; | ||||
| 	justify-content: flex-end; | ||||
| 	padding: 18px; | ||||
| } | ||||
| .action_btn { | ||||
|   float: right; | ||||
|   margin: 5px 15px; | ||||
|   font-size: 14px; | ||||
| } | ||||
| .add { | ||||
| 	color: #0b58ff; | ||||
| } | ||||
| </style> | ||||
| @@ -1,300 +0,0 @@ | ||||
| <template> | ||||
|   <el-form ref="dataForm" :rules="rules" label-width="130px" :model="dataForm"> | ||||
|     <el-row> | ||||
|       <el-col :span='12'> | ||||
|         <el-form-item label="工单名称" prop="name"> | ||||
|           <el-input v-model="dataForm.name"></el-input> | ||||
|         </el-form-item> | ||||
|       </el-col> | ||||
|       <el-col :span='12'> | ||||
|         <el-form-item label="工单编码" prop="code"> | ||||
|           <el-input v-model="dataForm.code" disabled></el-input> | ||||
|         </el-form-item> | ||||
|       </el-col> | ||||
|     </el-row> | ||||
|     <el-row> | ||||
|       <el-col :span='12'> | ||||
|         <el-form-item label="产品名称" prop="planProductId"> | ||||
|           <el-select v-model="dataForm.planProductId" placeholder="请选择" style="width: 100%;" @change="selectProduct"> | ||||
|             <el-option | ||||
|               v-for="item in productList" | ||||
|               :key="item.id" | ||||
|               :label="item.name" | ||||
|               :value="item.id"> | ||||
|             </el-option> | ||||
|           </el-select> | ||||
|         </el-form-item> | ||||
|       </el-col> | ||||
|       <el-col :span='12'> | ||||
|         <el-form-item label="产品规格" prop="productSpec"> | ||||
|           <el-input v-model="dataForm.productSpec" disabled></el-input> | ||||
|         </el-form-item> | ||||
|       </el-col> | ||||
|     </el-row> | ||||
|     <el-row> | ||||
|       <el-col :span='12'> | ||||
|         <el-form-item label="计划开始时间"> | ||||
|           <el-date-picker | ||||
|             v-model="planStartTime" | ||||
|             type="datetime" | ||||
|             value-format="yyyy-MM-dd HH:mm:ss" | ||||
|             style="width: 100%;" | ||||
|             placeholder="选择日期"> | ||||
|           </el-date-picker> | ||||
|         </el-form-item> | ||||
|       </el-col> | ||||
|       <el-col :span='12'> | ||||
|         <el-form-item label="计划完成时间"> | ||||
|           <el-date-picker | ||||
|             v-model="planFinishTime" | ||||
|             type="datetime" | ||||
|             value-format="yyyy-MM-dd HH:mm:ss" | ||||
|             style="width: 100%;" | ||||
|             placeholder="选择日期"> | ||||
|           </el-date-picker> | ||||
|         </el-form-item> | ||||
|       </el-col> | ||||
|     </el-row> | ||||
|     <el-row> | ||||
|       <el-col :span='12'> | ||||
|         <el-form-item label="计划投入数量" prop="planAssignQuantity"> | ||||
|           <el-input-number v-model="dataForm.planAssignQuantity" :min="0" :max="9999999999999" style="width: 100%;"></el-input-number> | ||||
|         </el-form-item> | ||||
|       </el-col> | ||||
|       <el-col :span='12'> | ||||
|         <el-form-item label="计划生产数量" prop="planQuantity"> | ||||
|           <el-input-number v-model="dataForm.planQuantity" :min="0" :max="9999999999999" style="width: 100%;"></el-input-number> | ||||
|         </el-form-item> | ||||
|       </el-col> | ||||
|     </el-row> | ||||
|     <el-row> | ||||
|       <el-col :span='12'> | ||||
|         <el-form-item label="关联工艺" prop="processFlowId"> | ||||
|           <el-select v-model="dataForm.processFlowId" placeholder="请选择" style="width: 100%;"> | ||||
|             <el-option | ||||
|               v-for="item in processFlowList" | ||||
|               :key="item.id" | ||||
|               :label="item.name" | ||||
|               :value="item.id"> | ||||
|             </el-option> | ||||
|           </el-select> | ||||
|         </el-form-item> | ||||
|       </el-col> | ||||
|       <el-col :span='12'> | ||||
|         <el-form-item label="物料计算方式" prop="materialMethod"> | ||||
|           <el-radio-group v-model="dataForm.materialMethod"> | ||||
|             <el-radio :label="1">产品基础</el-radio> | ||||
|             <el-radio :label="2">工艺扩展</el-radio> | ||||
|           </el-radio-group> | ||||
|         </el-form-item> | ||||
|       </el-col> | ||||
|     </el-row> | ||||
|     <el-row> | ||||
|       <el-col :span='12'> | ||||
|         <el-form-item label="优先级" prop="priority"> | ||||
|           <el-select v-model="dataForm.priority" placeholder="请选择" style="width: 100%;"> | ||||
|             <el-option | ||||
|               v-for="item in getDictDatas(DICT_TYPE.ORDER_PRIORITY)" | ||||
|               :key="item.value" | ||||
|               :label="item.label" | ||||
|               :value="item.value"> | ||||
|             </el-option> | ||||
|           </el-select> | ||||
|         </el-form-item> | ||||
|       </el-col> | ||||
|       <el-col :span='12'> | ||||
|         <el-form-item label="工单类型" prop="type"> | ||||
|           <el-select v-model="dataForm.type" placeholder="请选择" style="width: 100%;"> | ||||
|             <el-option | ||||
|               v-for="item in workOrderTypeList" | ||||
|               :key="item.id" | ||||
|               :label="item.name" | ||||
|               :value="item.id"> | ||||
|             </el-option> | ||||
|           </el-select> | ||||
|         </el-form-item> | ||||
|       </el-col> | ||||
|     </el-row> | ||||
|     <el-row> | ||||
|       <el-col :span='12'> | ||||
|         <el-form-item label="关联产线" prop="productLineIds"> | ||||
|           <el-select v-model="dataForm.productLineIds" placeholder="请选择" multiple style="width: 100%;"> | ||||
|             <el-option | ||||
|               v-for="item in productLineList" | ||||
|               :key="item.id" | ||||
|               :label="item.name" | ||||
|               :value="item.id"> | ||||
|             </el-option> | ||||
|           </el-select> | ||||
|         </el-form-item> | ||||
|       </el-col> | ||||
|       <el-col :span='12'> | ||||
|         <el-form-item label="负责人" prop="workers"> | ||||
|           <el-input v-model="dataForm.workers"></el-input> | ||||
|         </el-form-item> | ||||
|       </el-col> | ||||
|     </el-row> | ||||
|     <!-- <el-row> | ||||
|       <el-col :span='12'> | ||||
|         <el-form-item label="计划分配订单量" prop="planAssignmentQuantity"> | ||||
|           <el-input-number v-model="form.planAssignmentQuantity" :min="0" :max="9999999999999" style="width: 100%;"></el-input-number> | ||||
|         </el-form-item> | ||||
|       </el-col> | ||||
|     </el-row> --> | ||||
|   </el-form> | ||||
| </template> | ||||
| <script> | ||||
| import { getProductAll } from '@/api/base/product' | ||||
| import { getProcessFlowList, workOrderList } from '@/api/base/orderManage' | ||||
| import { createCoreWO, updateCoreWO, getCode, getCoreWO } from '@/api/base/coreWorkOrder' | ||||
| import { getLineAll } from '@/api/base/productionLine' | ||||
| import basicAdd from '../../core/mixins/basic-add'; | ||||
|  | ||||
| export default { | ||||
|   name: 'AddWorkOrder', | ||||
|   mixins: [basicAdd], | ||||
|   data() { | ||||
|     return { | ||||
|       urlOptions: { | ||||
| 			  isGetCode: true, | ||||
|         codeURL: getCode, | ||||
| 				createURL: createCoreWO, | ||||
| 				updateURL: updateCoreWO, | ||||
| 				infoURL: getCoreWO | ||||
| 			}, | ||||
|       dataForm: { | ||||
|         id: undefined, | ||||
|         workOrderId: '', | ||||
|         name: '', | ||||
|         code: '', | ||||
|         planProductId: '', | ||||
|         productSpec: '', | ||||
|         planStartTime: '', | ||||
|         planFinishTime: '', | ||||
|         planAssignQuantity: 0, | ||||
|         planQuantity: 0, | ||||
|         processFlowId: '', | ||||
|         materialMethod: 1, | ||||
|         priority: '', | ||||
|         productLineIds: [], | ||||
|         type: '', | ||||
|         workers: '' | ||||
|       }, | ||||
|       rules: { | ||||
|         name: [{ required: true, message: "工单名称不能为空", trigger: "blur" }], | ||||
|         planProductId: [{ required: true, message: "产品名称不能为空", trigger: "change" }], | ||||
|         planAssignQuantity: [{ required: true, message: "计划投入数量不能为空", trigger: "blur" }], | ||||
|         planQuantity: [{ required: true, message: "计划生产数量不能为空", trigger: "blur" }], | ||||
|         productLineIds: [{ required: true, message: "产品不能为空", trigger: "change" }] | ||||
|       }, | ||||
|       productList: [], | ||||
|       processFlowList: [], | ||||
|       productLineList: [], | ||||
|       workOrderTypeList: [ | ||||
|         {id: 1,name:'标准工单'}, | ||||
|         {id: 2, name:'特殊工单'} | ||||
|       ], | ||||
|       planStartTime: '', | ||||
|       planFinishTime: '', | ||||
|       isBind: false, | ||||
|       workOrderList: [] | ||||
|     } | ||||
|   }, | ||||
|   mounted() { | ||||
|     this.getDict() | ||||
|   }, | ||||
|   methods: { | ||||
|     init(id) { | ||||
|       this.dataForm.id = id || ""; | ||||
|       this.visible = true; | ||||
|       if (this.urlOptions.getOption) { | ||||
|         this.getArr() | ||||
|       } | ||||
|       this.$nextTick(() => { | ||||
|         this.$refs["dataForm"].resetFields(); | ||||
|         this.planStartTime = '' | ||||
|         this.planFinishTime = '' | ||||
|         if (this.dataForm.id) { | ||||
|           getCoreWO(id).then(response => { | ||||
|             this.dataForm = response.data; | ||||
|           }); | ||||
|         } else { | ||||
|           if (this.urlOptions.isGetCode) { | ||||
|             this.getCode() | ||||
|           } | ||||
| 				} | ||||
|       }); | ||||
|     }, | ||||
|     // 表单提交 | ||||
|     dataFormSubmit() { | ||||
|       this.$refs["dataForm"].validate((valid) => { | ||||
|         if (!valid) { | ||||
|           return false; | ||||
|         } | ||||
|         // 修改的提交 | ||||
|         if (this.dataForm.id) { | ||||
|           this.urlOptions.updateURL(this.dataForm).then(response => { | ||||
|             this.$modal.msgSuccess("修改成功"); | ||||
|             this.visible = false; | ||||
|             this.$emit("refreshDataList"); | ||||
|           }); | ||||
|           return; | ||||
|         } | ||||
|         // 添加的提交 | ||||
|         this.urlOptions.createURL(this.dataForm).then(response => { | ||||
|           this.$modal.msgSuccess("新增成功"); | ||||
|           this.visible = false; | ||||
|           this.$confirm('是否添加预使用主原料信息?', '提示', { | ||||
|             confirmButtonText: '确定', | ||||
|             cancelButtonText: '取消', | ||||
|             type: 'warning' | ||||
|           }).then(() => { | ||||
|             this.$emit("refreshDataList", true); | ||||
|           }).catch(() => { | ||||
|             this.$emit("refreshDataList");         | ||||
|           }); | ||||
|         }); | ||||
|       }); | ||||
|     }, | ||||
|     getCode() { | ||||
| 			this.urlOptions.codeURL() | ||||
| 				.then(({ data: res }) => { | ||||
| 					this.dataForm.code = res; | ||||
| 				}) | ||||
| 				.catch(() => {}); | ||||
| 		}, | ||||
|     getDict() { | ||||
|       // 产品 | ||||
|       getProductAll().then(res => { | ||||
|         this.productList = res.data || [] | ||||
|       }) | ||||
|       // 产线 | ||||
|       getLineAll().then(res => { | ||||
|         this.productLineList = res.data || [] | ||||
|       }) | ||||
|       // 工艺 | ||||
|       getProcessFlowList().then(res => { | ||||
|         this.processFlowList = res.data || [] | ||||
|       }) | ||||
|       // 工单list | ||||
|       workOrderList({ | ||||
|         status: 1 | ||||
|       }).then(res => { | ||||
|         this.workOrderList = res.data || [] | ||||
|       }) | ||||
|     }, | ||||
|     // 选产品带出规格 | ||||
|     selectProduct(val) { | ||||
|       if (val) { | ||||
|         this.productList.map(item => { | ||||
|           if (val === item.id) { | ||||
|             this.dataForm.productSpec = item.specifications | ||||
|           } | ||||
|         }) | ||||
|       } else { | ||||
|         this.dataForm.productSpec = '' | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| } | ||||
| </script> | ||||
| @@ -1,211 +0,0 @@ | ||||
| <template> | ||||
| 	<el-dialog | ||||
| 		:visible.sync="visible" | ||||
| 		:width="'35%'" | ||||
| 		:append-to-body="true" | ||||
| 		:close-on-click-modal="false" | ||||
| 		class="dialog"> | ||||
| 		<template #title> | ||||
| 			<slot name="title"> | ||||
| 				<div class="titleStyle"> | ||||
| 					{{ !dataForm.id ? '新增' : '编辑' }} | ||||
| 				</div> | ||||
| 			</slot> | ||||
| 		</template> | ||||
|  | ||||
| 		<el-form | ||||
| 			ref="dataForm" | ||||
| 			:model="dataForm" | ||||
| 			:rules="dataRule" | ||||
| 			label-width="100px" | ||||
| 			@keyup.enter.native="dataFormSubmit()"> | ||||
| 			<el-form-item label="原料" prop="material"> | ||||
| 				<el-select | ||||
| 					v-model="dataForm.material" | ||||
| 					filterable | ||||
| 					style="width: 100%" | ||||
| 					placeholder="请选择原料"> | ||||
| 					<el-option | ||||
| 						v-for="dict in getDictDatas('material')" | ||||
| 						:key="dict.value" | ||||
| 						:label="dict.label" | ||||
| 						:value="dict.value" /> | ||||
| 				</el-select> | ||||
| 			</el-form-item> | ||||
| 			<el-form-item label="来源" prop="origin"> | ||||
| 				<el-select | ||||
| 					v-model="dataForm.origin" | ||||
| 					filterable | ||||
| 					style="width: 100%" | ||||
| 					placeholder="请选择来源"> | ||||
| 					<el-option | ||||
| 						v-for="dict in originList" | ||||
| 						:key="dict.value" | ||||
| 						:label="dict.label" | ||||
| 						:value="dict.value" /> | ||||
| 				</el-select> | ||||
| 			</el-form-item> | ||||
| 			<el-form-item label="供应商" prop="supplierId"> | ||||
| 				<el-select | ||||
| 					v-model="dataForm.supplierId" | ||||
| 					filterable | ||||
| 					style="width: 100%" | ||||
| 					placeholder="请选择供应商"> | ||||
| 					<el-option | ||||
| 						v-for="dict in supplierList" | ||||
| 						:key="dict.id" | ||||
| 						:label="dict.name" | ||||
| 						:value="dict.id" /> | ||||
| 				</el-select> | ||||
| 			</el-form-item> | ||||
| 			<el-form-item label="批次号" prop="batch"> | ||||
| 				<el-input | ||||
| 					v-model="dataForm.batch" | ||||
| 					clearable | ||||
| 					placeholder="请输入规格" /> | ||||
| 			</el-form-item> | ||||
| 			<el-form-item label="数量" prop="num"> | ||||
| 				<el-input-number | ||||
| 					v-model="dataForm.num" | ||||
| 					clearable | ||||
| 					style="width: 100%" | ||||
| 					placeholder="请输入数量" /> | ||||
| 			</el-form-item> | ||||
| 			<el-form-item label="单位" prop="unit"> | ||||
| 				<el-select | ||||
| 					v-model="dataForm.unit" | ||||
| 					filterable | ||||
| 					placeholder="请选择单位"> | ||||
| 					<el-option | ||||
| 						v-for="dict in getDictDatas('unit_dict')" | ||||
| 						:key="dict.value" | ||||
| 						:label="dict.label" | ||||
| 						:value="dict.value" /> | ||||
| 				</el-select> | ||||
| 			</el-form-item> | ||||
| 		</el-form> | ||||
|  | ||||
| 		<el-row style="text-align: right"> | ||||
| 			<el-button @click="visible = false">取消</el-button> | ||||
| 			<el-button type="primary" @click="dataFormSubmit()">确定</el-button> | ||||
| 		</el-row> | ||||
| 	</el-dialog> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import { | ||||
| 	createCoreWOMa, | ||||
| 	updateCoreWOMa, | ||||
| 	getCoreWOMa | ||||
| } from '@/api/base/coreWorkOrder'; | ||||
| import { getSupplierList } from "@/api/base/material"; | ||||
| import { getDictDatas} from "@/utils/dict"; | ||||
|  | ||||
| export default { | ||||
| 	props: { | ||||
| 		productId: { | ||||
| 			type: String, | ||||
| 			default: '', | ||||
| 		}, | ||||
| 	}, | ||||
| 	data() { | ||||
| 		return { | ||||
| 			visible: false, | ||||
| 			dataForm: { | ||||
| 				id: undefined, | ||||
| 				material: '', | ||||
| 				origin: undefined, | ||||
| 				supplierId: undefined, | ||||
| 				batch: undefined, | ||||
| 				num: 0, | ||||
| 				unit: undefined | ||||
| 			}, | ||||
| 			originList: [ | ||||
| 				{ label: 1, value: '内部'}, | ||||
| 				{ label: 2, value: '采购'} | ||||
| 			], | ||||
| 			supplierList: [], | ||||
| 			dataRule: { | ||||
| 				material: [{ required: true, message: '物料不能为空', trigger: 'blur' }], | ||||
| 				num: [{ required: true, message: '数量不能为空', trigger: 'blur' }] | ||||
| 			}, | ||||
| 		}; | ||||
| 	}, | ||||
| 	mounted() { | ||||
| 		this.getDict() | ||||
| 	}, | ||||
| 	methods: { | ||||
| 		async getDict() { | ||||
| 			// 供应商列表 | ||||
| 			const supplierRes = await getSupplierList(); | ||||
| 			this.supplierList = supplierRes.data; | ||||
| 		}, | ||||
| 		init(id) { | ||||
| 			this.dataForm.id = id || ''; | ||||
| 			this.visible = true; | ||||
| 			this.$nextTick(() => { | ||||
| 				this.$refs['dataForm'].resetFields(); | ||||
| 				if (this.dataForm.id) { | ||||
| 					getCoreWOMa({ | ||||
| 						id: this.dataForm.id | ||||
| 					}).then((res) => { | ||||
| 						this.dataForm = res.data | ||||
| 					}); | ||||
| 				} | ||||
| 			}); | ||||
| 		}, | ||||
| 		// 表单提交 | ||||
| 		dataFormSubmit() { | ||||
| 			this.$refs['dataForm'].validate((valid) => { | ||||
| 				if (valid) { | ||||
| 					// 修改的提交 | ||||
| 					if (this.dataForm.id) { | ||||
| 						updateCoreWOMa({ | ||||
| 							...this.dataForm, | ||||
| 							workOrderId: this.productId, | ||||
| 						}).then((response) => { | ||||
| 							this.$modal.msgSuccess('修改成功'); | ||||
| 							this.visible = false; | ||||
| 							this.$emit('refreshDataList'); | ||||
| 						}); | ||||
| 						return; | ||||
| 					} | ||||
| 					// 添加的提交 | ||||
| 					createCoreWOMa({ | ||||
| 						...this.dataForm, | ||||
| 						workOrderId: this.productId, | ||||
| 					}).then((response) => { | ||||
| 						this.$modal.msgSuccess('新增成功'); | ||||
| 						this.visible = false; | ||||
| 						this.$emit('refreshDataList'); | ||||
| 					}); | ||||
| 				} | ||||
| 			}); | ||||
| 		}, | ||||
| 	}, | ||||
| }; | ||||
| </script> | ||||
|  | ||||
| <style scoped> | ||||
| .dialog >>> .el-dialog__body { | ||||
| 	padding: 30px 24px; | ||||
| } | ||||
| .dialog >>> .el-dialog__header { | ||||
| 	font-size: 16px; | ||||
| 	color: rgba(0, 0, 0, 0.85); | ||||
| 	font-weight: 500; | ||||
| 	padding: 13px 24px; | ||||
| 	border-bottom: 1px solid #e9e9e9; | ||||
| } | ||||
| .dialog >>> .el-dialog__header .titleStyle::before { | ||||
| 	content: ''; | ||||
| 	display: inline-block; | ||||
| 	width: 4px; | ||||
| 	height: 16px; | ||||
| 	background-color: #0b58ff; | ||||
| 	border-radius: 1px; | ||||
| 	margin-right: 8px; | ||||
| 	position: relative; | ||||
| 	top: 2px; | ||||
| } | ||||
| </style> | ||||
| @@ -1,265 +0,0 @@ | ||||
| <template> | ||||
| 	<div class="app-container"> | ||||
| 		<search-bar | ||||
| 			:formConfigs="formConfig" | ||||
| 			ref="searchBarForm" | ||||
| 			@headBtnClick="buttonClick" /> | ||||
| 		<base-table | ||||
| 			v-loading="dataListLoading" | ||||
| 			:table-props="tableProps" | ||||
| 			:page="listQuery.pageNo" | ||||
| 			:limit="listQuery.pageSize" | ||||
| 			:table-data="tableData"> | ||||
| 			<method-btn | ||||
| 				v-if="tableBtn.length" | ||||
| 				slot="handleBtn" | ||||
| 				:width="300" | ||||
| 				label="操作" | ||||
| 				:method-list="tableBtn" | ||||
| 				@clickBtn="handleClick" /> | ||||
| 		</base-table> | ||||
| 		<pagination | ||||
| 			:limit.sync="listQuery.pageSize" | ||||
| 			:page.sync="listQuery.pageNo" | ||||
| 			:total="listQuery.total" | ||||
| 			@pagination="getDataList" /> | ||||
| 		<base-dialog | ||||
| 			:dialogTitle="addOrEditTitle" | ||||
| 			:dialogVisible="addOrUpdateVisible" | ||||
| 			@cancel="handleCancel" | ||||
| 			@confirm="handleConfirm" | ||||
| 			:before-close="handleCancel" | ||||
| 			width="70%"> | ||||
| 			<add-work-order | ||||
| 				ref="addOrUpdate" | ||||
| 				@refreshDataList="refreshWorkOrder"></add-work-order> | ||||
| 		</base-dialog> | ||||
| 		<add-or-update | ||||
| 			v-if="detailVisible" | ||||
| 			ref="detail" | ||||
| 			@refreshDataList="closeDetail"></add-or-update> | ||||
| 	</div> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import AddOrUpdate from './add-or-updata'; | ||||
| import AddWorkOrder from './addWorkOrder' | ||||
| import basicPage from '../../core/mixins/basic-page'; | ||||
| import { parseTime } from '../../core/mixins/code-filter'; | ||||
| import { | ||||
| 	getCoreWOPage, | ||||
| 	deleteCoreWO | ||||
| } from '@/api/base/coreWorkOrder'; | ||||
|  | ||||
| const tableProps = [ | ||||
| 	{ | ||||
| 		prop: 'createTime', | ||||
| 		label: '创建时间', | ||||
| 		filter: parseTime | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'name', | ||||
| 		label: '工单名称' | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'code', | ||||
| 		label: '工单编码' | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'workers', | ||||
| 		label: '负责人' | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'priority', | ||||
| 		label: '优先级', | ||||
| 		filter: (val) => ['', '低', '正常', '高'][val] | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'triggerOrigin', | ||||
| 		label: '来源', | ||||
| 		filter: (val) => ['', 'MES', 'ERP'][val] | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'status', | ||||
| 		label: '工单状态', | ||||
| 		filter: (val) => ['', '等待', '激活', '暂停', '完成', '', '', '', '', '作废'][val] | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'planFinishTime', | ||||
| 		label: '计划完成时间', | ||||
| 		filter: parseTime | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'planQuantity', | ||||
| 		label: '计划生产数量' | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'actualQuantity', | ||||
| 		label: '实际生产数量' | ||||
| 	} | ||||
| ]; | ||||
|  | ||||
| export default { | ||||
| 	mixins: [basicPage], | ||||
| 	components: { | ||||
| 		AddWorkOrder, | ||||
| 		AddOrUpdate | ||||
| 	}, | ||||
| 	data() { | ||||
| 		return { | ||||
| 			urlOptions: { | ||||
| 				getDataListURL: getCoreWOPage, | ||||
| 				deleteURL: deleteCoreWO | ||||
| 			}, | ||||
| 			detailVisible: false, | ||||
| 			tableProps, | ||||
| 			tableBtn: [ | ||||
| 				this.$auth.hasPermi(`base:core-work-order:update`) | ||||
| 					? { | ||||
| 							type: 'edit', | ||||
| 							btnName: '编辑', | ||||
| 					  } | ||||
| 					: undefined, | ||||
| 					this.$auth.hasPermi(`base:core-work-order:material`) | ||||
| 					? { | ||||
| 							type: 'material', | ||||
| 							btnName: '预使用原料信息', | ||||
| 					  } | ||||
| 					: undefined, | ||||
| 					this.$auth.hasPermi(`base:core-work-order:detail`) | ||||
| 					? { | ||||
| 							type: 'detail', | ||||
| 							btnName: '查看详情', | ||||
| 					  } | ||||
| 					: undefined, | ||||
|           this.$auth.hasPermi(`base:core-work-order:delete`) | ||||
| 					? { | ||||
| 							type: 'delete', | ||||
| 							btnName: '删除', | ||||
| 					  } | ||||
| 					: undefined, | ||||
| 					// { | ||||
| 					// 	type: 'equal', | ||||
| 					// 	btnName: '开始', | ||||
| 					// 	showParam: { | ||||
| 					// 		type: '&', | ||||
| 					// 		data: [ | ||||
| 					// 			{ | ||||
| 					// 				name: 'status', | ||||
| 					// 				type: 'equal', | ||||
| 					// 				value: 1 | ||||
| 					// 			} | ||||
| 					// 		] | ||||
| 					// 	} | ||||
| 					// } | ||||
| 			].filter((v)=>v), | ||||
| 			tableData: [], | ||||
| 			formConfig: [ | ||||
| 				{ | ||||
| 					type: 'input', | ||||
| 					label: '工单名称', | ||||
| 					placeholder: '工单名称', | ||||
| 					param: 'name' | ||||
| 				}, | ||||
| 				{ | ||||
|           type: 'select', | ||||
|           label: '状态', | ||||
|           selectOptions: [ | ||||
| 						{ id: 1, name: '等待' }, | ||||
| 						{ id: 2, name: '激活' }, | ||||
| 						{ id: 3, name: '暂停' }, | ||||
| 						{ id: 4, name: '完成' }, | ||||
| 						{ id: 9, name: '作废' } | ||||
| 					], | ||||
|           param: 'status', | ||||
|           clearable: true | ||||
|         }, | ||||
| 				{ | ||||
|           type: 'datePicker', | ||||
|           label: '工单实际开始时间', | ||||
|           dateType: 'datetimerange', | ||||
|           format: 'yyyy-MM-dd', | ||||
|           valueFormat: 'yyyy-MM-dd HH:mm:ss', | ||||
|           rangeSeparator: '-', | ||||
|           startPlaceholder: '开始时间', | ||||
|           endPlaceholder: '结束时间', | ||||
|           width: 350, | ||||
|           param: 'time' | ||||
|         }, | ||||
| 				{ | ||||
| 					type: 'button', | ||||
| 					btnName: '查询', | ||||
| 					name: 'search', | ||||
| 					color: 'primary', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'separate', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: this.$auth.hasPermi('base:core-work-order:create') ? 'button' : '', | ||||
| 					btnName: '新增', | ||||
| 					name: 'add', | ||||
| 					color: 'success', | ||||
| 					plain: true | ||||
| 				}, | ||||
| 			], | ||||
| 		}; | ||||
| 	}, | ||||
| 	created() {}, | ||||
| 	methods: { | ||||
| 		refreshWorkOrder(val) { | ||||
| 			console.log(val) | ||||
| 			if (val) { | ||||
| 				console.log('打印') | ||||
| 			} else { | ||||
| 				this.successSubmit() | ||||
| 			} | ||||
| 		}, | ||||
| 		closeDetail() { | ||||
| 			this.detailVisible = false | ||||
| 			this.getDataList() | ||||
| 		}, | ||||
| 		// 其他方法 | ||||
| 		otherMethods(val) { | ||||
| 			if (val.type === 'material') { | ||||
| 				this.detailVisible = true; | ||||
|         this.addOrEditTitle = "预使用主原料信息"; | ||||
|         this.$nextTick(() => { | ||||
|           this.$refs.detail.init(val.data.id, true); | ||||
|         }); | ||||
| 			} | ||||
| 		}, | ||||
| 		buttonClick(val) { | ||||
| 			switch (val.btnName) { | ||||
| 				case 'search': | ||||
| 					this.listQuery.pageNo = 1; | ||||
| 					this.listQuery.pageSize = 10; | ||||
| 					this.listQuery.name = val.name ? val.name : undefined; | ||||
| 					this.listQuery.status = val.status ? val.status : undefined; | ||||
| 					this.listQuery.startProduceTime = val.time ? val.time : undefined | ||||
| 					this.getDataList(); | ||||
| 					break; | ||||
| 				case 'reset': | ||||
| 					this.$refs.searchBarForm.resetForm(); | ||||
| 					this.listQuery = { | ||||
| 						pageSize: 10, | ||||
| 						pageNo: 1, | ||||
| 						total: 1, | ||||
| 					}; | ||||
| 					this.getDataList(); | ||||
| 					break; | ||||
| 				case 'add': | ||||
| 					this.addOrEditTitle = '新增'; | ||||
| 					this.addOrUpdateVisible = true; | ||||
| 					this.addOrUpdateHandle(); | ||||
| 					break; | ||||
| 				case 'export': | ||||
| 					this.handleExport(); | ||||
| 					break; | ||||
| 				default: | ||||
| 					console.log(val); | ||||
| 			} | ||||
| 		}, | ||||
| 	}, | ||||
| }; | ||||
| </script> | ||||
| @@ -1,339 +0,0 @@ | ||||
| <!-- | ||||
|  * @Author: zwq | ||||
|  * @Date: 2021-11-18 14:16:25 | ||||
|  * @LastEditors: DY | ||||
|  * @LastEditTime: 2023-11-03 11:01:24 | ||||
|  * @Description: | ||||
| --> | ||||
| <template> | ||||
| 	<el-form | ||||
| 		:model="dataForm" | ||||
| 		:rules="dataRule" | ||||
| 		ref="dataForm" | ||||
| 		@keyup.enter.native="dataFormSubmit()" | ||||
| 		label-width="80px"> | ||||
| 		<el-row :gutter="20"> | ||||
| 			<el-col :span="12"> | ||||
| 				<el-form-item label="员工姓名" prop="name"> | ||||
| 					<el-input v-model="dataForm.name" clearable placeholder="请输入员工姓名" /> | ||||
| 				</el-form-item> | ||||
| 			</el-col> | ||||
| 			<el-col :span="12"> | ||||
| 				<el-form-item label="员工照片" prop="fileUrl"> | ||||
| 					<imageUpload v-model="dataForm.fileUrl" :limit="1"/> | ||||
| 				</el-form-item> | ||||
| 			</el-col> | ||||
| 		</el-row> | ||||
| 		<el-row :gutter="20"> | ||||
| 			<el-col :span="12"> | ||||
| 				<el-form-item label="员工号" prop="code"> | ||||
| 					<el-input v-model="dataForm.code" clearable placeholder="请输入员工号" /> | ||||
| 				</el-form-item> | ||||
| 			</el-col> | ||||
| 		</el-row> | ||||
| 		<el-row :gutter="20"> | ||||
| 			<el-col :span="12"> | ||||
| 				<el-form-item label="性别" prop="sex"> | ||||
| 					<el-select | ||||
| 						v-model="dataForm.sex" | ||||
| 						filterable | ||||
| 						placeholder="请选择性别"> | ||||
| 						<el-option | ||||
| 							v-for="dict in sexList" | ||||
| 							:key="dict.id" | ||||
| 							:label="dict.name" | ||||
| 							:value="dict.id" /> | ||||
| 					</el-select> | ||||
| 				</el-form-item> | ||||
| 			</el-col> | ||||
| 			<el-col :span="12"> | ||||
| 				<el-form-item label="电话" prop="telephone"> | ||||
| 					<el-input v-model="dataForm.telephone" maxlength="11" clearable placeholder="请输入电话" /> | ||||
| 				</el-form-item> | ||||
| 			</el-col> | ||||
| 		</el-row> | ||||
| 		<el-row :gutter="20"> | ||||
| 			<el-col :span="12"> | ||||
| 				<el-form-item label="部门" prop="departmentId"> | ||||
| 					<treeselect v-model="dataForm.departmentId" :options="menuOptions" :normalizer="normalizer" :show-count="true" placeholder="选择部门"/> | ||||
| 				</el-form-item> | ||||
| 			</el-col> | ||||
| 			<el-col :span="12"> | ||||
| 				<el-form-item label="职位" prop="position"> | ||||
| 					<el-input v-model="dataForm.position" clearable placeholder="请输入职位" /> | ||||
| 				</el-form-item> | ||||
| 			</el-col> | ||||
| 		</el-row> | ||||
| 		<el-row :gutter="20"> | ||||
| 			<el-col :span="12"> | ||||
| 				<el-form-item label="专业" prop="majorIdList"> | ||||
| 					<el-select | ||||
| 						v-model="majorIdList" | ||||
| 						filterable | ||||
| 						multiple | ||||
| 						placeholder="请选择专业"> | ||||
| 						<el-option | ||||
| 							v-for="dict in majorList" | ||||
| 							:key="dict.id" | ||||
| 							:label="dict.name" | ||||
| 							:value="dict.id" /> | ||||
| 					</el-select> | ||||
| 				</el-form-item> | ||||
| 			</el-col> | ||||
| 			<el-col :span="12"> | ||||
| 				<el-form-item label="入职时间" prop="entryTime"> | ||||
| 					<el-date-picker | ||||
| 						v-model="dataForm.entryTime" | ||||
| 						type="date" | ||||
| 						format='yyyy-MM-dd' | ||||
|          		value-format='timestamp' | ||||
| 						placeholder="选择入职时间" /> | ||||
| 				</el-form-item> | ||||
| 			</el-col> | ||||
| 		</el-row> | ||||
| 		<el-row :gutter="20"> | ||||
| 			<el-col :span="12"> | ||||
| 				<el-form-item label="状态" prop="status"> | ||||
| 					<el-radio-group v-model="dataForm.status" @input="setOut"> | ||||
| 						<el-radio :label="1">在职</el-radio> | ||||
| 						<el-radio :label="2">离职</el-radio> | ||||
| 					</el-radio-group> | ||||
| 				</el-form-item> | ||||
| 			</el-col> | ||||
| 			<el-col :span="12"> | ||||
| 				<el-form-item label="离职时间" prop="outTime"> | ||||
| 					<el-date-picker | ||||
| 						v-model="dataForm.outTime" | ||||
| 						type="date" | ||||
| 						:disabled="isOut" | ||||
| 						format='yyyy-MM-dd' | ||||
|          		value-format='timestamp' | ||||
| 						placeholder="选择离职时间" /> | ||||
| 				</el-form-item> | ||||
| 			</el-col> | ||||
| 		</el-row> | ||||
| 		<el-row :gutter="20"> | ||||
| 			<el-col :span="12"> | ||||
| 				<el-form-item label="教育程度" prop="education"> | ||||
| 					<el-select | ||||
| 						v-model="dataForm.education" | ||||
| 						filterable | ||||
| 						placeholder="请选择教育程度"> | ||||
| 						<el-option | ||||
| 							v-for="dict in educationList" | ||||
| 							:key="dict.id" | ||||
| 							:label="dict.name" | ||||
| 							:value="dict.id" /> | ||||
| 					</el-select> | ||||
| 				</el-form-item> | ||||
| 			</el-col> | ||||
| 			<el-col :span="12"> | ||||
| 				<el-form-item label="劳务成本(元/班次)" prop="workCost"> | ||||
| 					<el-input type="number" v-model.number="dataForm.workCost" clearable placeholder="请输入劳务成本" /> | ||||
| 				</el-form-item> | ||||
| 			</el-col> | ||||
| 		</el-row> | ||||
| 		<el-form-item label="备注" prop="remark"> | ||||
| 			<el-input | ||||
| 				v-model="dataForm.remark" | ||||
| 				placeholder="请输入备注" /> | ||||
| 		</el-form-item> | ||||
| 	</el-form> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import basicAdd from '../../core/mixins/basic-add'; | ||||
| import { createCoreWorker, updateCoreWorker, getCoreWorker, getCode, createWoBindMa, getWoBindMaPage, deleteWoBindMa } from "@/api/base/coreWorker"; | ||||
| import { getCoreDepartmentList } from "@/api/base/coreDepartment"; | ||||
| import { getCoreMajorList } from "@/api/base/coreMajor"; | ||||
| import ImageUpload from '@/components/ImageUpload'; | ||||
| import Treeselect from "@riophae/vue-treeselect"; | ||||
| import "@riophae/vue-treeselect/dist/vue-treeselect.css"; | ||||
|  | ||||
| export default { | ||||
| 	mixins: [basicAdd], | ||||
| 	components: { | ||||
|     ImageUpload, | ||||
| 		Treeselect | ||||
|   }, | ||||
| 	data() { | ||||
| 		return { | ||||
| 			urlOptions: { | ||||
| 			  isGetCode: true, | ||||
|         codeURL: getCode, | ||||
| 				createURL: createCoreWorker, | ||||
| 				updateURL: updateCoreWorker, | ||||
| 				infoURL: getCoreWorker, | ||||
| 			}, | ||||
| 			sexList: [ | ||||
| 				{ id: 0, name: '男' }, | ||||
| 				{ id: 1, name: '女' } | ||||
| 			], | ||||
| 			educationList: [ | ||||
| 				{ id: '1', name: '初中' }, | ||||
| 				{ id: '2', name: '高中' }, | ||||
| 				{ id: '3', name: '中专' }, | ||||
| 				{ id: '5', name: '大专' }, | ||||
| 				{ id: '6', name: '大学本科' }, | ||||
| 				{ id: '7', name: '研究生及以上' } | ||||
| 			], | ||||
| 			departmentList: [], | ||||
| 			majorList: [], | ||||
| 			isOut: true, | ||||
| 			dataForm: { | ||||
|         id: undefined, | ||||
|         code: undefined, | ||||
|         name: undefined, | ||||
| 				fileUrl: undefined, | ||||
| 				sex: 0, | ||||
| 				telephone: undefined, | ||||
| 				departmentId: undefined, | ||||
| 				position: undefined, | ||||
| 				entryTime: new Date().getTime(), | ||||
| 				status: 1, | ||||
| 				outTime: undefined, | ||||
| 				education: undefined, | ||||
| 				workCost: undefined, | ||||
|         remark: undefined, | ||||
| 			}, | ||||
| 			majorIdList: undefined, | ||||
| 			departmentlList: [], | ||||
| 			menuOptions: [], | ||||
| 			bindIds: [], | ||||
| 			workerId: '', | ||||
| 			dataRule: { | ||||
|         code: [{ required: true, message: "员工编码不能为空", trigger: "blur" }], | ||||
|         name: [{ required: true, message: "员工姓名不能为空", trigger: "blur" }], | ||||
| 				telephone: [ | ||||
| 					{ required: false, trigger: "blur", message: "手机号不能为空" }, | ||||
|           { | ||||
|             validator: function (rule, value, callback) { | ||||
|               if (value) { | ||||
| 								if (/^(?:(?:\+|00)86)?1(?:3[\d]|4[5-79]|5[0-35-9]|6[5-7]|7[0-8]|8[\d]|9[189])\d{8}$/.test(value) === false) { | ||||
| 									callback(new Error("手机号格式错误")); | ||||
| 								} | ||||
| 							} else { | ||||
|                 callback(); | ||||
|               } | ||||
|             }, trigger: "blur" | ||||
|           } | ||||
|         ], | ||||
|       } | ||||
| 		}; | ||||
| 	}, | ||||
| 	mounted() { | ||||
| 		this.getDict() | ||||
| 	}, | ||||
| 	methods: { | ||||
| 		async getDict() { | ||||
| 			// 部门列表 | ||||
| 			this.menuOptions = [] | ||||
| 			const res = await getCoreDepartmentList(); | ||||
| 			this.departmentlList = res.data.map(item => { | ||||
| 				item.parentId = item.parentId ? item.parentId : 0 | ||||
| 				return item | ||||
| 			}); | ||||
| 			// const menu = { id: 0, name: '总部门', children: [] }; | ||||
| 			// menu.children = this.handleTree(this.departmentlList, "id") | ||||
| 			this.menuOptions = this.handleTree(this.departmentlList, "id") | ||||
| 			// 专业列表 | ||||
| 			const majorRes = await getCoreMajorList(); | ||||
| 			this.majorList = majorRes.data; | ||||
| 		}, | ||||
| 		setOut(val) { | ||||
| 			if (val === 1) { | ||||
| 				this.isOut = true | ||||
| 			} else { | ||||
| 				this.isOut = false | ||||
| 			} | ||||
| 		}, | ||||
| 		// 表单提交 | ||||
|     dataFormSubmit() { | ||||
| 			console.log('111', this.dataForm) | ||||
|       this.$refs["dataForm"].validate((valid) => { | ||||
|         if (!valid) { | ||||
|           return false; | ||||
|         } | ||||
|  | ||||
| 				// 把员工--专业关系全删 | ||||
| 				this.bindIds.forEach(id => { | ||||
| 					deleteWoBindMa(id).then(res => {}) | ||||
| 				}); | ||||
|  | ||||
|         // 修改的提交 | ||||
|         if (this.dataForm.id) { | ||||
|           this.urlOptions.updateURL(this.dataForm).then(response => { | ||||
|             this.$modal.msgSuccess("修改成功"); | ||||
|             this.visible = false; | ||||
|             this.$emit("refreshDataList"); | ||||
|           }); | ||||
| 					this.majorIdList.forEach(majorId => { | ||||
| 						createWoBindMa({ | ||||
| 							workerId: this.dataForm.id, | ||||
| 							majorId: majorId | ||||
| 						}).then(res => {}) | ||||
| 					}); | ||||
|           return; | ||||
|         } | ||||
|         // 添加的提交 | ||||
|         this.urlOptions.createURL(this.dataForm).then(response => { | ||||
| 					// response.data = id | ||||
| 					this.workerId = response.data | ||||
| 					this.majorIdList.forEach(majorId => { | ||||
| 						createWoBindMa({ | ||||
| 							workerId: this.workerId, | ||||
| 							majorId: majorId | ||||
| 						}).then(res => {}) | ||||
| 					}); | ||||
|           this.$modal.msgSuccess("新增成功"); | ||||
|           this.visible = false; | ||||
|           this.$emit("refreshDataList"); | ||||
|         }); | ||||
|       }); | ||||
|     }, | ||||
| 		init(id) { | ||||
|       this.dataForm.id = id || ""; | ||||
|       this.visible = true; | ||||
|       if (this.urlOptions.getOption) { | ||||
|         this.getArr() | ||||
|       } | ||||
|       this.$nextTick(() => { | ||||
|         this.$refs["dataForm"].resetFields(); | ||||
|         if (this.dataForm.id) { | ||||
|           this.urlOptions.infoURL(id).then(response => { | ||||
|             this.dataForm = response.data; | ||||
|           }); | ||||
| 					// 获取员工--专业 | ||||
| 					getWoBindMaPage({ | ||||
| 						pageSize: 99, | ||||
| 						pageNo: 1, | ||||
| 						workerId: id | ||||
| 					}).then(res => { | ||||
| 						this.majorIdList = res.data.list.map(item => { | ||||
| 							return item.majorId | ||||
| 						}) | ||||
| 						this.bindIds = res.data.list.map(item => { | ||||
| 							return item.id | ||||
| 						}) | ||||
| 					}) | ||||
|         } else { | ||||
|           if (this.urlOptions.isGetCode) { | ||||
|             this.getCode() | ||||
|           } | ||||
| 				} | ||||
|       }); | ||||
|     }, | ||||
| 		/** 转换菜单数据结构 */ | ||||
|     normalizer(node) { | ||||
|       if (node.children && !node.children.length) { | ||||
|         delete node.children; | ||||
|       } | ||||
|       return { | ||||
|         id: node.id, | ||||
|         label: node.name, | ||||
|         children: node.children | ||||
|       }; | ||||
|     } | ||||
| 	} | ||||
| }; | ||||
| </script> | ||||
| @@ -1,204 +0,0 @@ | ||||
| <template> | ||||
| 	<div class="app-container"> | ||||
| 		<search-bar | ||||
| 			:formConfigs="formConfig" | ||||
| 			ref="searchBarForm" | ||||
| 			@headBtnClick="buttonClick" /> | ||||
| 		<base-table | ||||
| 			v-loading="dataListLoading" | ||||
| 			:table-props="tableProps" | ||||
| 			:page="listQuery.pageNo" | ||||
| 			:limit="listQuery.pageSize" | ||||
| 			:table-data="tableData"> | ||||
| 			<method-btn | ||||
| 				v-if="tableBtn.length" | ||||
| 				slot="handleBtn" | ||||
| 				:width="120" | ||||
| 				label="操作" | ||||
| 				:method-list="tableBtn" | ||||
| 				@clickBtn="handleClick" /> | ||||
| 		</base-table> | ||||
| 		<pagination | ||||
| 			:limit.sync="listQuery.pageSize" | ||||
| 			:page.sync="listQuery.pageNo" | ||||
| 			:total="listQuery.total" | ||||
| 			@pagination="getDataList" /> | ||||
| 		<base-dialog | ||||
| 			:dialogTitle="addOrEditTitle" | ||||
| 			:dialogVisible="addOrUpdateVisible" | ||||
| 			@cancel="handleCancel" | ||||
| 			@confirm="handleConfirm" | ||||
| 			:before-close="handleCancel" | ||||
| 			width="50%"> | ||||
| 			<add-or-update | ||||
| 				ref="addOrUpdate" | ||||
| 				@refreshDataList="successSubmit"></add-or-update> | ||||
| 		</base-dialog> | ||||
| 	</div> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import AddOrUpdate from './add-or-updata'; | ||||
| import basicPage from '../../core/mixins/basic-page'; | ||||
| import { parseTime } from '../../core/mixins/code-filter'; | ||||
| import { | ||||
| 	getCoreWorkerPage, | ||||
| 	deleteCoreWorker | ||||
| } from '@/api/base/coreWorker'; | ||||
| import moment from 'moment'; | ||||
|  | ||||
| const tableProps = [ | ||||
| 	{ | ||||
| 		prop: 'createTime', | ||||
| 		label: '创建时间', | ||||
| 		filter: parseTime | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'name', | ||||
| 		label: '姓名' | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'code', | ||||
| 		label: '员工号' | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'sex', | ||||
| 		label: '性别', | ||||
| 		filter: (val) => ['男', '女'][val] | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'entryTime', | ||||
| 		label: '入职时间', | ||||
| 		filter: (val) => val ? moment(val).format('yyyy-MM-DD') : '', | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'telephone', | ||||
| 		label: '联系电话' | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'status', | ||||
| 		label: '状态', | ||||
| 		filter: (val) => ['', '在职', '离职'][val] | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'departmentName', | ||||
| 		label: '部门' | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'majorName', | ||||
| 		label: '专业' | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'remark', | ||||
| 		label: '备注' | ||||
| 	}, | ||||
| ]; | ||||
|  | ||||
| export default { | ||||
| 	mixins: [basicPage], | ||||
| 	data() { | ||||
| 		return { | ||||
| 			urlOptions: { | ||||
| 				getDataListURL: getCoreWorkerPage, | ||||
| 				deleteURL: deleteCoreWorker | ||||
| 			}, | ||||
| 			tableProps, | ||||
| 			tableBtn: [ | ||||
| 				this.$auth.hasPermi(`base:core-worker:update`) | ||||
| 					? { | ||||
| 							type: 'edit', | ||||
| 							btnName: '编辑', | ||||
| 					  } | ||||
| 					: undefined, | ||||
|           this.$auth.hasPermi(`base:core-worker:delete`) | ||||
| 					? { | ||||
| 							type: 'delete', | ||||
| 							btnName: '删除', | ||||
| 					  } | ||||
| 					: undefined, | ||||
| 			].filter((v)=>v), | ||||
| 			tableData: [], | ||||
| 			formConfig: [ | ||||
| 				{ | ||||
| 					type: 'input', | ||||
| 					label: '员工姓名', | ||||
| 					placeholder: '员工姓名', | ||||
| 					param: 'name', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'select', | ||||
| 					label: '状态', | ||||
| 					placeholder: '请选择状态', | ||||
| 					param: 'status', | ||||
| 					selectOptions: [ | ||||
| 						{ id: 1, name: '在职' }, | ||||
| 						{ id: 2, name: '离职' } | ||||
| 					], | ||||
| 					filterable: true | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'button', | ||||
| 					btnName: '查询', | ||||
| 					name: 'search', | ||||
| 					color: 'primary', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'separate', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: this.$auth.hasPermi('base:core-worker:create') ? 'button' : '', | ||||
| 					btnName: '新增', | ||||
| 					name: 'add', | ||||
| 					color: 'success', | ||||
| 					plain: true | ||||
| 				}, | ||||
| 			], | ||||
| 		}; | ||||
| 	}, | ||||
| 	components: { | ||||
| 		AddOrUpdate, | ||||
| 	}, | ||||
| 	created() {}, | ||||
| 	methods: { | ||||
| 		// 获取数据列表 | ||||
|     // getDataList() { | ||||
|     //   this.dataListLoading = true; | ||||
|     //   this.urlOptions.getDataListURL(this.listQuery).then(response => { | ||||
|     //     this.tableData = response.data.list; | ||||
|     //     this.listQuery.total = response.data.total; | ||||
|     //     this.dataListLoading = false; | ||||
|     //   }); | ||||
|     // }, | ||||
| 		buttonClick(val) { | ||||
| 			switch (val.btnName) { | ||||
| 				case 'search': | ||||
| 					this.listQuery.pageNo = 1; | ||||
| 					this.listQuery.pageSize = 10; | ||||
| 					this.listQuery.name = val.name ? val.name : undefined; | ||||
| 					this.listQuery.status = val.status ? val.status : undefined; | ||||
| 					this.getDataList(); | ||||
| 					break; | ||||
| 				case 'reset': | ||||
| 					this.$refs.searchBarForm.resetForm(); | ||||
| 					this.listQuery = { | ||||
| 						pageSize: 10, | ||||
| 						pageNo: 1, | ||||
| 						total: 1, | ||||
| 					}; | ||||
| 					this.getDataList(); | ||||
| 					break; | ||||
| 				case 'add': | ||||
| 					this.addOrEditTitle = '新增'; | ||||
| 					this.addOrUpdateVisible = true; | ||||
| 					this.addOrUpdateHandle(); | ||||
| 					break; | ||||
| 				case 'export': | ||||
| 					this.handleExport(); | ||||
| 					break; | ||||
| 				default: | ||||
| 					console.log(val); | ||||
| 			} | ||||
| 		}, | ||||
| 	}, | ||||
| }; | ||||
| </script> | ||||
| @@ -1,103 +0,0 @@ | ||||
| <!-- | ||||
|  * @Author: zwq | ||||
|  * @Date: 2021-11-18 14:16:25 | ||||
|  * @LastEditors: DY | ||||
|  * @LastEditTime: 2023-11-03 19:31:25 | ||||
|  * @Description: | ||||
| --> | ||||
| <template> | ||||
| 	<el-form | ||||
| 		:model="dataForm" | ||||
| 		:rules="dataRule" | ||||
| 		ref="dataForm" | ||||
| 		@keyup.enter.native="dataFormSubmit()" | ||||
| 		label-width="80px"> | ||||
| 		<el-row :gutter="20"> | ||||
| 			<el-col :span="12"> | ||||
| 				<el-form-item label="工段名称" prop="name"> | ||||
| 					<el-input v-model="dataForm.name" clearable placeholder="请输入工段名称" /> | ||||
| 				</el-form-item> | ||||
| 			</el-col> | ||||
| 			<el-col :span="12"> | ||||
| 				<el-form-item label="工段编号" prop="code"> | ||||
| 					<el-input v-model="dataForm.code" clearable placeholder="请输入工段编号" /> | ||||
| 				</el-form-item> | ||||
| 			</el-col> | ||||
| 		</el-row> | ||||
| 		<el-row :gutter="20"> | ||||
| 			<el-col :span="12"> | ||||
| 				<el-form-item label="产线" prop="productionLineId"> | ||||
| 					<el-select | ||||
| 						v-model="dataForm.productionLineId" | ||||
| 						filterable | ||||
| 						placeholder="请选择产线"> | ||||
| 						<el-option | ||||
| 							v-for="dict in proLineList" | ||||
| 							:key="dict.id" | ||||
| 							:label="dict.name" | ||||
| 							:value="dict.id" /> | ||||
| 					</el-select> | ||||
| 				</el-form-item> | ||||
| 			</el-col> | ||||
| 			<el-col :span="12"> | ||||
| 				<el-form-item label="排序" prop="sort"> | ||||
| 					<el-input-number | ||||
| 						v-model="dataForm.sort" | ||||
| 						placeholder="排序" /> | ||||
| 				</el-form-item> | ||||
| 			</el-col> | ||||
| 		</el-row> | ||||
| 		<el-form-item label="备注" prop="remark"> | ||||
| 			<el-input | ||||
| 				v-model="dataForm.remark" | ||||
| 				placeholder="请输入备注" /> | ||||
| 		</el-form-item> | ||||
| 	</el-form> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import basicAdd from '../../core/mixins/basic-add'; | ||||
| import { createCWSection, updateCWSection, getCWSection, getCode } from "@/api/base/coreWorkshopSection"; | ||||
| import { getCorePLList } from '@/api/base/coreProductionLine'; | ||||
|  | ||||
| export default { | ||||
| 	mixins: [basicAdd], | ||||
| 	data() { | ||||
| 		return { | ||||
| 			urlOptions: { | ||||
| 			  isGetCode: true, | ||||
|         codeURL: getCode, | ||||
| 				createURL: createCWSection, | ||||
| 				updateURL: updateCWSection, | ||||
| 				infoURL: getCWSection | ||||
| 			}, | ||||
| 			dataForm: { | ||||
|         id: undefined, | ||||
|         code: undefined, | ||||
|         name: undefined, | ||||
|         description: undefined, | ||||
| 				sort: 0, | ||||
| 				productionLineId: undefined, | ||||
|         remark: undefined, | ||||
| 			}, | ||||
| 			proLineList: [], | ||||
| 			dataRule: { | ||||
|         code: [{ required: true, message: "专业编码不能为空", trigger: "blur" }], | ||||
|         name: [{ required: true, message: "专业名称不能为空", trigger: "blur" }], | ||||
| 				productionLineId: [{ required: true, message: "产线不能为空", trigger: "blur" }], | ||||
|         sort: [{ required: true, message: "排序不能为空", trigger: "blur" }] | ||||
|       } | ||||
| 		}; | ||||
| 	}, | ||||
| 	mounted() { | ||||
| 		this.getDict() | ||||
| 	}, | ||||
| 	methods: { | ||||
| 		async getDict() { | ||||
| 			// 产线列表 | ||||
| 			const res = await getCorePLList(); | ||||
| 			this.proLineList = res.data; | ||||
| 		}, | ||||
| 	} | ||||
| }; | ||||
| </script> | ||||
| @@ -1,172 +0,0 @@ | ||||
| <template> | ||||
| 	<div class="app-container"> | ||||
| 		<search-bar | ||||
| 			:formConfigs="formConfig" | ||||
| 			ref="searchBarForm" | ||||
| 			@headBtnClick="buttonClick" /> | ||||
| 		<base-table | ||||
| 			v-loading="dataListLoading" | ||||
| 			:table-props="tableProps" | ||||
| 			:page="listQuery.pageNo" | ||||
| 			:limit="listQuery.pageSize" | ||||
| 			:table-data="tableData"> | ||||
| 			<method-btn | ||||
| 				v-if="tableBtn.length" | ||||
| 				slot="handleBtn" | ||||
| 				:width="120" | ||||
| 				label="操作" | ||||
| 				:method-list="tableBtn" | ||||
| 				@clickBtn="handleClick" /> | ||||
| 		</base-table> | ||||
| 		<pagination | ||||
| 			:limit.sync="listQuery.pageSize" | ||||
| 			:page.sync="listQuery.pageNo" | ||||
| 			:total="listQuery.total" | ||||
| 			@pagination="getDataList" /> | ||||
| 		<base-dialog | ||||
| 			:dialogTitle="addOrEditTitle" | ||||
| 			:dialogVisible="addOrUpdateVisible" | ||||
| 			@cancel="handleCancel" | ||||
| 			@confirm="handleConfirm" | ||||
| 			:before-close="handleCancel" | ||||
| 			width="50%"> | ||||
| 			<add-or-update | ||||
| 				ref="addOrUpdate" | ||||
| 				@refreshDataList="successSubmit"></add-or-update> | ||||
| 		</base-dialog> | ||||
| 	</div> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import AddOrUpdate from './add-or-updata'; | ||||
| import basicPage from '../../core/mixins/basic-page'; | ||||
| import { parseTime } from '../../core/mixins/code-filter'; | ||||
| import { | ||||
| 	getCWSectionPage, | ||||
| 	deleteCWSection | ||||
| } from '@/api/base/coreWorkshopSection'; | ||||
|  | ||||
| const tableProps = [ | ||||
| 	{ | ||||
| 		prop: 'createTime', | ||||
| 		label: '添加时间', | ||||
| 		filter: parseTime | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'code', | ||||
| 		label: '工段编码' | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'name', | ||||
| 		label: '工段名称' | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'productionLineName', | ||||
| 		label: '产线名' | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'sort', | ||||
| 		label: '排序' | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'remark', | ||||
| 		label: '备注' | ||||
| 	}, | ||||
| ]; | ||||
|  | ||||
| export default { | ||||
| 	mixins: [basicPage], | ||||
| 	data() { | ||||
| 		return { | ||||
| 			urlOptions: { | ||||
| 				getDataListURL: getCWSectionPage, | ||||
| 				deleteURL: deleteCWSection | ||||
| 			}, | ||||
| 			tableProps, | ||||
| 			tableBtn: [ | ||||
| 				this.$auth.hasPermi(`base:core-workshop-section:update`) | ||||
| 					? { | ||||
| 							type: 'edit', | ||||
| 							btnName: '编辑', | ||||
| 					  } | ||||
| 					: undefined, | ||||
|           this.$auth.hasPermi(`base:core-workshop-section:delete`) | ||||
| 					? { | ||||
| 							type: 'delete', | ||||
| 							btnName: '删除', | ||||
| 					  } | ||||
| 					: undefined, | ||||
| 			].filter((v)=>v), | ||||
| 			tableData: [], | ||||
| 			formConfig: [ | ||||
| 				{ | ||||
| 					type: 'input', | ||||
| 					label: '工段名称', | ||||
| 					placeholder: '工段名称', | ||||
| 					param: 'name' | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'button', | ||||
| 					btnName: '查询', | ||||
| 					name: 'search', | ||||
| 					color: 'primary', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'separate', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: this.$auth.hasPermi('base:core-workshop-section:create') ? 'button' : '', | ||||
| 					btnName: '新增', | ||||
| 					name: 'add', | ||||
| 					color: 'success', | ||||
| 					plain: true | ||||
| 				}, | ||||
| 			], | ||||
| 		}; | ||||
| 	}, | ||||
| 	components: { | ||||
| 		AddOrUpdate, | ||||
| 	}, | ||||
| 	created() {}, | ||||
| 	methods: { | ||||
| 		// 获取数据列表 | ||||
|     // getDataList() { | ||||
|     //   this.dataListLoading = true; | ||||
|     //   this.urlOptions.getDataListURL(this.listQuery).then(response => { | ||||
|     //     this.tableData = response.data.list; | ||||
|     //     this.listQuery.total = response.data.total; | ||||
|     //     this.dataListLoading = false; | ||||
|     //   }); | ||||
|     // }, | ||||
| 		buttonClick(val) { | ||||
| 			switch (val.btnName) { | ||||
| 				case 'search': | ||||
| 					this.listQuery.pageNo = 1; | ||||
| 					this.listQuery.pageSize = 10; | ||||
| 					this.listQuery.name = val.name ? val.name : undefined; | ||||
| 					this.getDataList(); | ||||
| 					break; | ||||
| 				case 'reset': | ||||
| 					this.$refs.searchBarForm.resetForm(); | ||||
| 					this.listQuery = { | ||||
| 						pageSize: 10, | ||||
| 						pageNo: 1, | ||||
| 						total: 1, | ||||
| 					}; | ||||
| 					this.getDataList(); | ||||
| 					break; | ||||
| 				case 'add': | ||||
| 					this.addOrEditTitle = '新增'; | ||||
| 					this.addOrUpdateVisible = true; | ||||
| 					this.addOrUpdateHandle(); | ||||
| 					break; | ||||
| 				case 'export': | ||||
| 					this.handleExport(); | ||||
| 					break; | ||||
| 				default: | ||||
| 					console.log(val); | ||||
| 			} | ||||
| 		}, | ||||
| 	}, | ||||
| }; | ||||
| </script> | ||||
| @@ -1,65 +0,0 @@ | ||||
| <!-- | ||||
|  * @Author: zwq | ||||
|  * @Date: 2023-08-01 15:27:31 | ||||
|  * @LastEditors: zwq | ||||
|  * @LastEditTime: 2023-08-01 16:25:54 | ||||
|  * @Description: | ||||
| --> | ||||
| <template> | ||||
| 	<div :class="[className, { 'p-0': noPadding }]"> | ||||
| 		<slot /> | ||||
| 	</div> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| export default { | ||||
| 	props: { | ||||
| 		size: { | ||||
| 			// 取值范围:  xl lg md sm | ||||
| 			type: String, | ||||
| 			default: 'de', | ||||
| 			validator: function (val) { | ||||
| 				return ['xl', 'lg', 'de', 'md', 'sm'].indexOf(val) !== -1; | ||||
| 			}, | ||||
| 		}, | ||||
| 		noPadding: { | ||||
| 			type: Boolean, | ||||
| 			default: false, | ||||
| 		}, | ||||
| 	}, | ||||
| 	computed: { | ||||
| 		className: function () { | ||||
| 			return `${this.size}-title`; | ||||
| 		}, | ||||
| 	}, | ||||
| }; | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
| $pxls: (xl, 28px) (lg, 24px) (de, 20px) (md, 18px) (sm, 16px); | ||||
| $mgr: 8px; | ||||
| @each $size, $height in $pxls { | ||||
| 	.#{$size}-title { | ||||
| 		font-size: 18px; | ||||
| 		line-height: $height; | ||||
| 		color: #000; | ||||
| 		font-weight: 500; | ||||
| 		font-family: '微软雅黑', 'Microsoft YaHei', Arial, Helvetica, sans-serif; | ||||
|  | ||||
| 		&::before { | ||||
| 			content: ''; | ||||
| 			display: inline-block; | ||||
| 			vertical-align: top; | ||||
| 			width: 4px; | ||||
| 			height: $height + 2px; | ||||
| 			border-radius: 1px; | ||||
| 			margin-right: $mgr; | ||||
| 			background-color: #0b58ff; | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
|  | ||||
| .p-0 { | ||||
| 	padding: 0; | ||||
| } | ||||
| </style> | ||||
| @@ -1,411 +0,0 @@ | ||||
| <template> | ||||
|   <el-drawer :visible.sync="drawer" :append-to-body="true" size="80%"> | ||||
|     <small-title slot="title" :no-padding="true"> | ||||
|       <!-- <template v-for="demo in demoList"> --> | ||||
|       <!-- <el-button :key="demo.name" :type="demo.name === curDemo ? 'primary' : ' '" @click="curDemo = demo.name"> --> | ||||
|       <!-- {{ $t('module.packingManage.printModelDesign') }} --> | ||||
|       模板设计 | ||||
|       <!-- </el-button> --> | ||||
|       <!-- </template> --> | ||||
|     </small-title> | ||||
|     <el-card> | ||||
|       <el-row style="margin-bottom: 10px"> | ||||
|         <el-col :span="4"> | ||||
|           <!-- 模板选择 --> | ||||
|  | ||||
|           <!-- <el-select | ||||
|           v-model="mode" | ||||
|           filterable | ||||
|           :default-value="0" | ||||
|           option-label-prop="label" | ||||
|           style="width: 100%;" | ||||
|           @change="changeMode" | ||||
|         > | ||||
|           <el-option v-for="(opt,idx) in modeList" :key="idx" :label="opt.name" :value="idx"> | ||||
|             {{ opt.name }} | ||||
|           </el-option> | ||||
|         </el-select> --> | ||||
|         </el-col> | ||||
|         <el-col :span="20"> | ||||
|           <!-- 纸张设置 --> | ||||
|           <el-button-group style="margin:0 10px"> | ||||
|             <el-button | ||||
|               v-for="(value,type) in paperTypes" | ||||
|               :key="type" | ||||
|               :type="curPaperType === type ? 'primary' : ' '" | ||||
|               @click="setPaper(type,value)" | ||||
|             > | ||||
|               {{ type }} | ||||
|             </el-button> | ||||
|           </el-button-group> | ||||
|           <el-input-number | ||||
|             style="margin:0 10px" | ||||
|             :value="scaleValue " | ||||
|             :precision="2" | ||||
|             :step="0.1" | ||||
|             :min="scaleMin" | ||||
|             :max="scaleMax" | ||||
|             @change="changeScale" | ||||
|           /> | ||||
|           <el-popover v-model="paperPopVisible" placement="bottom" width="300" title="设置纸张宽高(mm)"> | ||||
|             <div style="display: flex;align-items: center;justify-content: space-between;margin-bottom: 10px"> | ||||
|               <el-input v-model="paperWidth" type="number" style=" width: 100px; text-align: center" place="宽(mm)" />~ | ||||
|               <el-input v-model="paperHeight" type="number" style=" width: 100px; text-align: center" place="高(mm)" /> | ||||
|             </div> | ||||
|             <div> | ||||
|               <el-button type="primary" style="width: 100%" size="mini" @click="otherPaper">确定</el-button> | ||||
|             </div> | ||||
|             <el-button slot="reference" type="primary" style="margin:0 10px">自定义宽高</el-button> | ||||
|           </el-popover> | ||||
|  | ||||
|           <!--          <a-button-group>--> | ||||
|           <!--            <template v-for="(value,type) in paperTypes">--> | ||||
|           <!--              <a-button :type="curPaperType === type ? 'primary' : 'info'" @click="setPaper(type,value)" :key="type">--> | ||||
|           <!--                {{ type }}--> | ||||
|           <!--              </a-button>--> | ||||
|           <!--            </template>--> | ||||
|           <!--            <a-popover v-model="paperPopVisible" title="设置纸张宽高(mm)" trigger="click">--> | ||||
|           <!--              <div slot="content">--> | ||||
|           <!--                <a-input-group compact style="margin: 10px 10px">--> | ||||
|           <!--                  <a-input type="number" v-model="paperWidth" style=" width: 100px; text-align: center"--> | ||||
|           <!--                           placeholder="宽(mm)"/>--> | ||||
|           <!--                  <a-input style=" width: 30px; border-left: 0; pointer-events: none; backgroundColor: #fff"--> | ||||
|           <!--                           placeholder="~" disabled--> | ||||
|           <!--                  />--> | ||||
|           <!--                  <a-input type="number" v-model="paperHeight" style="width: 100px; text-align: center; border-left: 0"--> | ||||
|           <!--                           placeholder="高(mm)"/>--> | ||||
|           <!--                </a-input-group>--> | ||||
|           <!--                <a-button type="primary" style="width: 100%" @click="otherPaper">确定</a-button>--> | ||||
|           <!--              </div>--> | ||||
|           <!--              <a-button :type="'other'==curPaperType?'primary':''">自定义纸张</a-button>--> | ||||
|           <!--            </a-popover>--> | ||||
|           <!--          </a-button-group>--> | ||||
|  | ||||
|           <!-- 预览/打印 --> | ||||
|           <el-button-group> | ||||
|             <el-button type="primary" icon="redo" @click="rotatePaper()">旋转</el-button> | ||||
|             <el-button type="primary" icon="el-icon-view" @click="preView"> | ||||
|               预览 | ||||
|             </el-button> | ||||
|             <!-- <el-button type="primary" icon="el-icon-printer" @click="print"> | ||||
|             直接打印 | ||||
|           </el-button> --> | ||||
|             <el-button type="primary" icon="el-icon-s-management" @click="save"> | ||||
|               保存 | ||||
|             </el-button> | ||||
|             <el-button type="danger" icon="el-icon-delete" @click="clearPaper"> | ||||
|               清空 | ||||
|             </el-button> | ||||
|           </el-button-group> | ||||
|           <!-- 保存/清空 --> | ||||
|  | ||||
|         </el-col> | ||||
|       </el-row> | ||||
|       <el-row :gutter="24"> | ||||
|         <el-col :span="4"> | ||||
|           <el-card style="height: 100vh"> | ||||
|             <el-row> | ||||
|               <el-col :span="24" class="rect-printElement-types hiprintEpContainer" /> | ||||
|             </el-row> | ||||
|           </el-card> | ||||
|         </el-col> | ||||
|         <el-col :span="16"> | ||||
|           <el-card class="card-design"> | ||||
|             <div id="hiprint-printTemplate" class="hiprint-printTemplate" /> | ||||
|           </el-card> | ||||
|         </el-col> | ||||
|         <el-col :span="4" class="params_setting_container"> | ||||
|           <el-card> | ||||
|             <el-row class="hinnn-layout-sider"> | ||||
|               <div id="PrintElementOptionSetting" /> | ||||
|             </el-row> | ||||
|           </el-card> | ||||
|         </el-col> | ||||
|       </el-row> | ||||
|       <!-- 预览 --> | ||||
|       <print-preview ref="preView" /> | ||||
|     </el-card> | ||||
|   </el-drawer> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
|  | ||||
| import printPreview from './preview' | ||||
| import { MessageBox } from 'element-ui' | ||||
| import { hiprint } from 'vue-plugin-hiprint' | ||||
| import providers from './providers' | ||||
| import printData from './print-data' | ||||
| import $ from 'jquery' | ||||
| import SmallTitle from './SmallTitle.vue' | ||||
| let hiprintTemplate = null | ||||
| export default { | ||||
|   name: 'PrintCustom', | ||||
|   components: { printPreview, SmallTitle }, | ||||
|   // props: { | ||||
|   //   modelData: { | ||||
|   //     type: String, | ||||
|   //     default: '' | ||||
|   //   } | ||||
|   // }, | ||||
|   data() { | ||||
|     return { | ||||
|       // paperPopVisible: false, | ||||
|       // 模板选择 | ||||
|       mode: 0, | ||||
|       template: null, | ||||
|       modeList: [], | ||||
|       // 当前纸张 | ||||
|       curPaper: { | ||||
|         // type: 'other', | ||||
|         // width: 220, | ||||
|         // height: 80 | ||||
|       }, | ||||
|       drawer: false, | ||||
|       // 纸张类型 | ||||
|       paperTypes: { | ||||
|         'A3': { | ||||
|           width: 420, | ||||
|           height: 296.6 | ||||
|         }, | ||||
|         'A4': { | ||||
|           width: 210, | ||||
|           height: 297 | ||||
|         }, | ||||
|         'A5': { | ||||
|           width: 210, | ||||
|           height: 147.6 | ||||
|         }, | ||||
|         'B3': { | ||||
|           width: 500, | ||||
|           height: 352.6 | ||||
|         }, | ||||
|         'B4': { | ||||
|           width: 250, | ||||
|           height: 352.6 | ||||
|         }, | ||||
|         'B5': { | ||||
|           width: 250, | ||||
|           height: 175.6 | ||||
|         } | ||||
|       }, | ||||
|       scaleValue: 1, | ||||
|       scaleMax: 5, | ||||
|       scaleMin: 0.5, | ||||
|       // 自定义纸张 | ||||
|       paperPopVisible: false, | ||||
|       paperWidth: '210', | ||||
|       paperHeight: '297' | ||||
|     } | ||||
|   }, | ||||
|   computed: { | ||||
|     curPaperType() { | ||||
|       let type = 'other' | ||||
|       const types = this.paperTypes | ||||
|       for (const key in types) { | ||||
|         const item = types[key] | ||||
|         const { width, height } = this.curPaper | ||||
|         if (item.width === width && item.height === height) { | ||||
|           type = key | ||||
|         } | ||||
|       } | ||||
|       return type | ||||
|     } | ||||
|   }, | ||||
|   mounted() { | ||||
|     this.init() | ||||
|     // console.log('aaaaaa') | ||||
|     // this.otherPaper() | ||||
|   }, | ||||
|   destroyed () { | ||||
|     $('.hiprintEpContainer').empty() | ||||
|   }, | ||||
|   methods: { | ||||
|     // handleClose() { | ||||
|     //   $('.hiprintEpContainer').empty() | ||||
|     // }, | ||||
|     init(data) { | ||||
|       this.drawer = true | ||||
|       this.modelData = data | ||||
|       this.modeList = providers.map((e) => { | ||||
|         return { type: e.type, name: e.name, value: e.value } | ||||
|       }) | ||||
|       this.changeMode() | ||||
|     }, | ||||
|     changeMode() { | ||||
|       // hiprintTemplate.clear() | ||||
|       // console.log(this.modelData) | ||||
|       const { mode } = this | ||||
|       const provider = providers[mode] | ||||
|       hiprint.init({ | ||||
|         providers: [provider.f] | ||||
|       }) | ||||
|  | ||||
|       // $('#hiprint-printTemplate').empty() | ||||
|       // console.log(JSON.parse(this.modelData)) | ||||
|       hiprint.setConfig() | ||||
|       // 替换配置 | ||||
|       hiprint.setConfig({ | ||||
|         movingDistance: 2.5, | ||||
|         text: { | ||||
|           supportOptions: [ | ||||
|             { | ||||
|               name: 'styler', | ||||
|               hidden: true | ||||
|             }, | ||||
|             { | ||||
|               name: 'formatter', | ||||
|               hidden: true | ||||
|             } | ||||
|           ] | ||||
|         } | ||||
|       }) | ||||
|  | ||||
|       // console.log(this.modelData) | ||||
|       // console.log($('#hiprint-printTemplate').empty()) | ||||
|       if (this.modelData) { | ||||
|         $('.hiprintEpContainer').empty() | ||||
|         hiprint.PrintElementTypeManager.build('.hiprintEpContainer', provider.value) | ||||
|         $('.hiprint-printTemplate').empty() | ||||
|         hiprintTemplate = new hiprint.PrintTemplate({ | ||||
|           template: JSON.parse(this.modelData), | ||||
|           settingContainer: '#PrintElementOptionSetting', | ||||
|           paginationContainer: '.hiprint-printPagination' | ||||
|         }) | ||||
|       } else { | ||||
|         $('.hiprintEpContainer').empty() | ||||
|         hiprint.PrintElementTypeManager.build('.hiprintEpContainer', provider.value) | ||||
|         $('.hiprint-printTemplate').empty() | ||||
|         // const templates = this.$ls.get('KEY_TEMPLATES', {}) | ||||
|         const template = provider.value | ||||
|         console.log(template) | ||||
|         hiprintTemplate = new hiprint.PrintTemplate({ | ||||
|           template: template, | ||||
|           settingContainer: '#PrintElementOptionSetting', | ||||
|           paginationContainer: '.hiprint-printPagination' | ||||
|         }) | ||||
|       } | ||||
|       // hiprintTemplate.design('#hiprint-printTemplate') | ||||
|       // console.log(hiprintTemplate) | ||||
|       hiprintTemplate.design('#hiprint-printTemplate', { grid: true }) | ||||
|       // 获取当前放大比例, 当zoom时传true 才会有 | ||||
|       this.scaleValue = hiprintTemplate.editingPanel.scale || 1 | ||||
|       // this.scaleValue = hiprintTemplate.editingPanel.scale || 1 | ||||
|     }, | ||||
|     /** | ||||
|      * 设置纸张大小 | ||||
|      * @param type [A3, A4, A5, B3, B4, B5, other] | ||||
|      * @param value {width,height} mm | ||||
|      */ | ||||
|     setPaper(type, value) { | ||||
|       try { | ||||
|         if (Object.keys(this.paperTypes).includes(type)) { | ||||
|           this.curPaper = { type: type, width: value.width, height: value.height } | ||||
|           hiprintTemplate.setPaper(value.width, value.height) | ||||
|         } else { | ||||
|           this.curPaper = { type: 'other', width: value.width, height: value.height } | ||||
|           hiprintTemplate.setPaper(value.width, value.height) | ||||
|         } | ||||
|       } catch (error) { | ||||
|         this.$message.error(`操作失败: ${error}`) | ||||
|       } | ||||
|     }, | ||||
|     changeScale(currentValue, oldValue) { | ||||
|       let big = false | ||||
|       currentValue <= oldValue ? big = false : big = true | ||||
|       let scaleValue = this.scaleValue | ||||
|       if (big) { | ||||
|         scaleValue += 0.1 | ||||
|         if (scaleValue > this.scaleMax) scaleValue = 5 | ||||
|       } else { | ||||
|         scaleValue -= 0.1 | ||||
|         if (scaleValue < this.scaleMin) scaleValue = 0.5 | ||||
|       } | ||||
|       if (hiprintTemplate) { | ||||
|         // scaleValue: 放大缩小值, false: 不保存(不传也一样), 如果传 true, 打印时也会放大 | ||||
|         hiprintTemplate.zoom(scaleValue) | ||||
|         this.scaleValue = scaleValue | ||||
|       } | ||||
|     }, | ||||
|     clearPaper() { | ||||
|       MessageBox.confirm('是否确认清空模板信息?', '警告', { | ||||
|         confirmButtonText: '确定', | ||||
|         cancelButtonText: '取消', | ||||
|         type: 'warning' | ||||
|       }).then(() => { | ||||
|         try { | ||||
|           hiprintTemplate.clear() | ||||
|         } catch (error) { | ||||
|           this.$message.error(`操作失败: ${error}`) | ||||
|         } | ||||
|       }).catch((err) => { | ||||
|         console.log(err) | ||||
|       }) | ||||
|     }, | ||||
|     otherPaper() { | ||||
|       const value = {} | ||||
|       value.width = this.paperWidth | ||||
|       value.height = this.paperHeight | ||||
|       this.paperPopVisible = false | ||||
|       this.setPaper('other', value) | ||||
|     }, | ||||
|     rotatePaper() { | ||||
|       if (hiprintTemplate) { | ||||
|         hiprintTemplate.rotatePaper() | ||||
|       } | ||||
|     }, | ||||
|     preView() { | ||||
|       const { width } = this.curPaper | ||||
|       this.$refs.preView.show(hiprintTemplate, printData, width) | ||||
|     }, | ||||
|     print() { | ||||
|       // if (window.hiwebSocket.opened) { | ||||
|       const printerList = hiprintTemplate.getPrinterList() | ||||
|       console.log(printerList) | ||||
|       hiprintTemplate.print2(printData, { printer: '', title: '预览打印' }) | ||||
|       // return | ||||
|       // } | ||||
|       // this.$message.error('客户端未连接,无法直接打印') | ||||
|     }, | ||||
|     save() { | ||||
|       // console.log(hiprintTemplate.getJson()) | ||||
|       const { mode } = this | ||||
|       const provider = providers[mode] | ||||
|       // console.log(hiprintTemplate.getJson()) | ||||
|       this.setTemplate({ | ||||
|         name: provider.value, | ||||
|         json: hiprintTemplate.getJson() | ||||
|       }) | ||||
|     }, | ||||
|     setTemplate(payload) { | ||||
|       // const templates = this.$ls.get('KEY_TEMPLATES', {}) | ||||
|       // console.log(payload.json) | ||||
|       // templates[payload.name] = payload.json | ||||
|       // this.$ls.set('KEY_TEMPLATES', templates) | ||||
|       this.$message.info('保存成功') | ||||
|       // console.log(JSON.stringify(payload.json)) | ||||
|       this.drawer = false | ||||
|       this.$emit('saveData', payload.json) | ||||
|       $('.hiprintEpContainer').empty() | ||||
|       // this.$parent.$parent.getModelData(payload.json) | ||||
|     } | ||||
|   } | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
| // build 拖拽 | ||||
| ::v-deep .hiprint-printElement-type >li>ul>li>a { | ||||
|   padding: 4px 4px; | ||||
|   color: #1296db; | ||||
|   line-height: 1; | ||||
|   height: auto; | ||||
|   text-overflow: ellipsis; | ||||
| } | ||||
| // 设计容器 | ||||
| .card-design { | ||||
|   // overflow: hidden; | ||||
|   overflow-x: auto; | ||||
|   overflow-y: auto; | ||||
| } | ||||
|  | ||||
| </style> | ||||
| @@ -1,89 +0,0 @@ | ||||
| <!-- | ||||
|  * @Author: zhp | ||||
|  * @Date: 2023-09-27 14:23:54 | ||||
|  * @LastEditTime: 2023-10-19 11:20:36 | ||||
|  * @LastEditors: zhp | ||||
|  * @Description: | ||||
| --> | ||||
| <template> | ||||
|   <el-dialog :visible="visible" :mask-closable="false" width="50%" @close="hideModal" :append-to-body="true"> | ||||
|     <div id="preview_content" /> | ||||
|     <template slot="title"> | ||||
|       <div style="margin-right: 20px">打印预览</div> | ||||
|       <el-button :loading="waitShowPrinter" type="primary" icon="printer" @click.stop="print">打印</el-button> | ||||
|       <el-button type="primary" icon="printer" @click.stop="toPdf">pdf</el-button> | ||||
|     </template> | ||||
|     <template slot="footer"> | ||||
|       <el-button key="close" type="info" @click="hideModal"> | ||||
|         关闭 | ||||
|       </el-button> | ||||
|     </template> | ||||
|   </el-dialog> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| export default { | ||||
|   name: 'PrintPreview', | ||||
|   props: {}, | ||||
|   data() { | ||||
|     return { | ||||
|       visible: false, | ||||
|       spinning: true, | ||||
|       waitShowPrinter: false, | ||||
|       // 纸张宽 mm | ||||
|       width: 0, | ||||
|       // 模板 | ||||
|       hiprintTemplate: {}, | ||||
|       // 数据 | ||||
|       printData: {} | ||||
|     } | ||||
|   }, | ||||
|   computed: {}, | ||||
|   watch: {}, | ||||
|   created() { | ||||
|   }, | ||||
|   mounted() { | ||||
|   }, | ||||
|   methods: { | ||||
|     hideModal() { | ||||
|       this.visible = false | ||||
|     }, | ||||
|     show(hiprintTemplate, printData, width = '210') { | ||||
|       this.visible = true | ||||
|       this.spinning = true | ||||
|       this.width = width | ||||
|       this.hiprintTemplate = hiprintTemplate | ||||
|       this.printData = printData | ||||
|       console.log(hiprintTemplate) | ||||
|       console.log(printData) | ||||
|       setTimeout(() => { | ||||
|         // eslint-disable-next-line no-undef | ||||
|         $('#preview_content').html(hiprintTemplate.getHtml(printData)) | ||||
|         this.spinning = false | ||||
|       }, 500) | ||||
|     }, | ||||
|     print() { | ||||
|       this.waitShowPrinter = true | ||||
|       this.hiprintTemplate.print(this.printData, {}, { | ||||
|         callback: () => { | ||||
|           console.log('callback') | ||||
|           this.waitShowPrinter = false | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     toPdf() { | ||||
|       this.hiprintTemplate.toPdf({}, '打印预览') | ||||
|     } | ||||
|   } | ||||
| } | ||||
|  | ||||
| </script> | ||||
| <!-- <style lang="less" scoped> | ||||
| /deep/ .ant-modal-body { | ||||
|   padding: 0px; | ||||
| } | ||||
|  | ||||
| /deep/ .ant-modal-content { | ||||
|   margin-bottom: 24px; | ||||
| } | ||||
| </style> --> | ||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| @@ -1,447 +0,0 @@ | ||||
| /* eslint-disable */ | ||||
| import {hiprint} from 'vue-plugin-hiprint' | ||||
|  | ||||
| /* eslint-disable */ | ||||
| // import {hiprint} from '../../index' | ||||
|  | ||||
| // 自定义设计元素1 | ||||
| export const aProvider = function (ops) { | ||||
|   var addElementTypes = function (context) { | ||||
|     context.removePrintElementTypes("aProviderModule"); | ||||
|     context.addPrintElementTypes( | ||||
|       "aProviderModule", | ||||
|       [ | ||||
|         new hiprint.PrintElementTypeGroup("平台", [ | ||||
|           { | ||||
|             tid: 'aProviderModule.header', title: '单据表头', data: '单据表头', type: 'text', | ||||
|             options: { | ||||
|               testData: '单据表头', | ||||
|               height: 17, | ||||
|               fontSize: 16.5, | ||||
|               fontWeight: "700", | ||||
|               textAlign: "center", | ||||
|               hideTitle: true | ||||
|             } | ||||
|           }, | ||||
|           { | ||||
|             tid: 'aProviderModule.type', title: '单据类型', data: '单据类型', type: 'text', | ||||
|             options: { | ||||
|               testData: '单据类型', | ||||
|               height: 16, | ||||
|               fontSize: 15, | ||||
|               fontWeight: "700", | ||||
|               textAlign: "center", | ||||
|               hideTitle: true | ||||
|             } | ||||
|           }, | ||||
|           { | ||||
|             tid: 'aProviderModule.order', title: '订单编号', data: 'XS888888888', type: 'text', | ||||
|             options: { | ||||
|               field: 'orderId', | ||||
|               testData: 'XS888888888', | ||||
|               height: 16, | ||||
|               fontSize: 6.75, | ||||
|               fontWeight: "700", | ||||
|               textAlign: "left", | ||||
|               textContentVerticalAlign: "middle" | ||||
|             } | ||||
|           }, | ||||
|           { | ||||
|             tid: 'aProviderModule.date', title: '业务日期', data: '2020-01-01', type: 'text', | ||||
|             options: { | ||||
|               field: 'date', | ||||
|               testData: '2020-01-01', | ||||
|               height: 16, | ||||
|               fontSize: 6.75, | ||||
|               fontWeight: "700", | ||||
|               textAlign: "left", | ||||
|               textContentVerticalAlign: "middle" | ||||
|             } | ||||
|           }, | ||||
|           { | ||||
|             tid: 'aProviderModule.barcode', title: '条形码', data: 'XS888888888', type: 'text', | ||||
|             options: { | ||||
|               field: 'barcode', | ||||
|               testData: 'XS888888888', | ||||
|               height: 32, | ||||
|               fontSize: 12, | ||||
|               lineHeight: 18, | ||||
|               textType: "barcode" | ||||
|             } | ||||
|           }, | ||||
|           { | ||||
|             tid: 'aProviderModule.qrcode', title: '二维码', data: 'XS888888888', type: 'text', | ||||
|             options: { | ||||
|               field: 'qrcode', | ||||
|               testData: 'XS888888888', | ||||
|               height: 32, | ||||
|               fontSize: 12, | ||||
|               lineHeight: 18, | ||||
|               textType: "qrcode" | ||||
|             } | ||||
|           }, | ||||
|           { | ||||
|             tid: 'aProviderModule.platform', title: '平台名称', data: '平台名称', type: 'text', | ||||
|             options: { | ||||
|               testData: '平台名称', | ||||
|               height: 17, | ||||
|               fontSize: 16.5, | ||||
|               fontWeight: "700", | ||||
|               textAlign: "center", | ||||
|               hideTitle: true | ||||
|             } | ||||
|           }, | ||||
|           {tid: 'aProviderModule.logo', title: 'Logo', data: '', type: 'image'}, | ||||
|         ]), | ||||
|         new hiprint.PrintElementTypeGroup("库管", [ | ||||
|           { | ||||
|             tid: 'aProviderModule.creater', title: '制单人', data: '李四', type: 'text', | ||||
|             options: { | ||||
|               field: 'creater', | ||||
|               testData: '李四', | ||||
|               height: 16, | ||||
|               fontSize: 6.75, | ||||
|               fontWeight: "700", | ||||
|               textAlign: "left", | ||||
|               textContentVerticalAlign: "middle" | ||||
|             } | ||||
|           }, | ||||
|           { | ||||
|             tid: 'aProviderModule.printDate', title: '打印时间', data: '2022-01-01 09:00', type: 'text', | ||||
|             options: { | ||||
|               field: 'printDate', | ||||
|               testData: '2022-01-01 09:00', | ||||
|               height: 16, | ||||
|               fontSize: 6.75, | ||||
|               fontWeight: "700", | ||||
|               textAlign: "left", | ||||
|               textContentVerticalAlign: "middle" | ||||
|             } | ||||
|           }, | ||||
|           { | ||||
|             tid: 'aProviderModule.signer', title: '库管签字', data: '', type: 'text', | ||||
|             options: { | ||||
|               title: '库管签字:', | ||||
|               height: 16, | ||||
|               fontSize: 6.75, | ||||
|               fontWeight: "700", | ||||
|               textAlign: "left", | ||||
|               textContentVerticalAlign: "middle" | ||||
|             } | ||||
|           }, | ||||
|         ]), | ||||
|         new hiprint.PrintElementTypeGroup("表格/其他", [ | ||||
|           { | ||||
|             tid: 'aProviderModule.table', title: '订单数据', | ||||
|             type: 'table', | ||||
|             options: { | ||||
|               field: 'table', | ||||
|               tableHeaderRepeat: 'first', | ||||
|               tableFooterRepeat: 'last', | ||||
|               fields: [ | ||||
|                 {text: '名称', field: 'NAME'}, | ||||
|                 {text: '数量', field: 'SL'}, | ||||
|                 {text: '规格', field: 'GG'}, | ||||
|                 {text: '条码', field: 'TM'}, | ||||
|                 {text: '单价', field: 'DJ'}, | ||||
|                 {text: '金额', field: 'JE'}, | ||||
|               ], | ||||
|             }, | ||||
|             editable: true, | ||||
|             columnDisplayEditable: true,//列显示是否能编辑 | ||||
|             columnDisplayIndexEditable: true,//列顺序显示是否能编辑 | ||||
|             columnTitleEditable: true,//列标题是否能编辑 | ||||
|             columnResizable: true, //列宽是否能调整 | ||||
|             columnAlignEditable: true,//列对齐是否调整 | ||||
|             isEnableEditField: true, //编辑字段 | ||||
|             isEnableContextMenu: true, //开启右键菜单 默认true | ||||
|             isEnableInsertRow: true, //插入行 | ||||
|             isEnableDeleteRow: true, //删除行 | ||||
|             isEnableInsertColumn: true, //插入列 | ||||
|             isEnableDeleteColumn: true, //删除列 | ||||
|             isEnableMergeCell: true, //合并单元格 | ||||
|             columns: [ | ||||
|               [ | ||||
|                 {title: '名称', align: 'center', field: 'NAME', width: 150}, | ||||
|                 {title: '数量', align: 'center', field: 'SL', width: 80}, | ||||
|                 {title: '规格', align: 'center', field: 'GG', width: 80, checked: false}, | ||||
|                 {title: '条码', align: 'center', field: 'TM', width: 100, checked: false}, | ||||
|                 {title: '单价', align: 'center', field: 'DJ', width: 100}, | ||||
|                 {title: '金额', align: 'center', field: 'JE', width: 100, checked: false}, | ||||
|               ], | ||||
|             ], | ||||
|             rowsColumnsMerge: function (data, col, index) { | ||||
|               // 返回一个数组,参数一为行(rowspan)合并数,参数二为列(colspan)合并数, 被合并的行或者列值设为0 | ||||
|               if (index == 0) { | ||||
|                 return [1, data.INDEX % 2 == 1 ? 2 : 1] | ||||
|               } else if (index > 0 && index < 2) { | ||||
|                 return [data.INDEX % 2 == 1 ? 0 : 1, 1] | ||||
|               } else { | ||||
|                 return [data.INDEX % 2 == 1 ? 2 : 0, 1] | ||||
|               } | ||||
|             }, | ||||
|             footerFormatter: function (options, rows, data, currentPageGridRowsData) { | ||||
|               if (data && data['totalCap']) { | ||||
|                 return `<td style="padding:0 10px" colspan="100">${'应收金额大写: ' + data['totalCap']}</td>` | ||||
|               } | ||||
|               return '<td style="padding:0 10px" colspan="100">应收金额大写: </td>' | ||||
|             }, | ||||
|           }, | ||||
|           {tid: 'aProviderModule.customText', title: '文本', customText: '自定义文本', custom: true, type: 'text'}, | ||||
|           { | ||||
|             tid: 'aProviderModule.longText', title: '长文本', type: 'longText', options: { | ||||
|               field: 'test.longText', | ||||
|               width: 200, | ||||
|               testData: '长文本分页/不分页测试' | ||||
|             }, | ||||
|           } | ||||
|         ]), | ||||
|         new hiprint.PrintElementTypeGroup("辅助", [ | ||||
|           { | ||||
|             tid: 'aProviderModule.hline', | ||||
|             title: '横线', | ||||
|             type: 'hline' | ||||
|           }, | ||||
|           { | ||||
|             tid: 'aProviderModule.vline', | ||||
|             title: '竖线', | ||||
|             type: 'vline' | ||||
|           }, | ||||
|           { | ||||
|             tid: 'aProviderModule.rect', | ||||
|             title: '矩形', | ||||
|             type: 'rect' | ||||
|           }, | ||||
|           { | ||||
|             tid: 'aProviderModule.oval', | ||||
|             title: '椭圆', | ||||
|             type: 'oval' | ||||
|           }, | ||||
|           { | ||||
|             tid: 'aProviderModule.barcode', | ||||
|             title: '条形码', | ||||
|             type: 'barcode', | ||||
|           }, | ||||
|           { | ||||
|             tid: 'aProviderModule.qrcode', | ||||
|             title: '二维码', | ||||
|             type: 'qrcode', | ||||
|           } | ||||
|         ]) | ||||
|       ] | ||||
|     ); | ||||
|   }; | ||||
|   return { | ||||
|     addElementTypes: addElementTypes | ||||
|   }; | ||||
| }; | ||||
|  | ||||
| // 自定义设计元素2 | ||||
| export const bProvider = function (ops) { | ||||
|   var addElementTypes = function (context) { | ||||
|     context.removePrintElementTypes("bProviderModule"); | ||||
|     context.addPrintElementTypes( | ||||
|       "bProviderModule", | ||||
|       [ | ||||
|         new hiprint.PrintElementTypeGroup("常规", [ | ||||
|           { | ||||
|             tid: 'bProviderModule.header', title: '单据表头', data: '单据表头', type: 'text', | ||||
|             options: { | ||||
|               testData: '单据表头', | ||||
|               height: 17, | ||||
|               fontSize: 16.5, | ||||
|               fontWeight: "700", | ||||
|               textAlign: "center", | ||||
|               hideTitle: true | ||||
|             } | ||||
|           }, | ||||
|           { | ||||
|             tid: 'bProviderModule.type', title: '单据类型', data: '单据类型', type: 'text', | ||||
|             options: { | ||||
|               testData: '单据类型', | ||||
|               height: 16, | ||||
|               fontSize: 15, | ||||
|               fontWeight: "700", | ||||
|               textAlign: "center", | ||||
|               hideTitle: true | ||||
|             } | ||||
|           }, | ||||
|           { | ||||
|             tid: 'bProviderModule.order', title: '订单编号', data: 'XS888888888', type: 'text', | ||||
|             options: { | ||||
|               field: 'orderId', | ||||
|               testData: 'XS888888888', | ||||
|               height: 16, | ||||
|               fontSize: 6.75, | ||||
|               fontWeight: "700", | ||||
|               textAlign: "left", | ||||
|               textContentVerticalAlign: "middle" | ||||
|             } | ||||
|           }, | ||||
|           { | ||||
|             tid: 'bProviderModule.date', title: '业务日期', data: '2020-01-01', type: 'text', | ||||
|             options: { | ||||
|               field: 'date', | ||||
|               testData: '2020-01-01', | ||||
|               height: 16, | ||||
|               fontSize: 6.75, | ||||
|               fontWeight: "700", | ||||
|               textAlign: "left", | ||||
|               textContentVerticalAlign: "middle" | ||||
|             } | ||||
|           }, | ||||
|           { | ||||
|             tid: 'bProviderModule.barcode', title: '条形码', data: 'XS888888888', type: 'text', | ||||
|             options: { | ||||
|               field: 'barcode', | ||||
|               testData: 'XS888888888', | ||||
|               height: 32, | ||||
|               fontSize: 12, | ||||
|               lineHeight: 18, | ||||
|               textType: "barcode" | ||||
|             } | ||||
|           }, | ||||
|           { | ||||
|             tid: 'bProviderModule.qrcode', title: '二维码', data: 'XS888888888', type: 'text', | ||||
|             options: { | ||||
|               field: 'qrcode', | ||||
|               testData: 'XS888888888', | ||||
|               height: 32, | ||||
|               fontSize: 12, | ||||
|               lineHeight: 18, | ||||
|               textType: "qrcode" | ||||
|             } | ||||
|           }, | ||||
|           { | ||||
|             tid: 'bProviderModule.platform', title: '平台名称', data: '平台名称', type: 'text', | ||||
|             options: { | ||||
|               testData: '平台名称', | ||||
|               height: 17, | ||||
|               fontSize: 16.5, | ||||
|               fontWeight: "700", | ||||
|               textAlign: "center", | ||||
|               hideTitle: true | ||||
|             } | ||||
|           }, | ||||
|           {tid: 'bProviderModule.image',  title: 'Logo', data: 'data: image/png;base64iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAHVklEQVR4nO2dT2wUVRzHv2/2T5eSAlvFilwgQUH+eLACaUxEiJLAxdh44MDZi2ChUIrSFtoCgbbSP4GDdwgeEA8kRTAI0iIGBL1ITLxgLAlCsCKBYndnx7zd35pl2+7On/de387OJ9l00515/z7z/szMmzfs7869mD0yCjw2gZAB4VhAiln4/dUaRGdU18aOnzw9dn24ioGJj0soFsJr1z2yNm+qN2/fvRFL8XyMYqTmFfxZ+TwMc1xKDsL/f2Ms8xGeLwuIRpCKx99MHf/i4uPrw5GQ9jIAfsCMXfw2HkuOX03Wb1qLh4+uIGFJjzecPoS5iEhUTg1hDMaM2GuRk6cGMTQUCYmPQQq86CMAkkPDkQirGAzXf7Du34ejN9IHmETCRjQGPL6D+4NnYDEJDQmXbaY6on/dm2Vm/jHdZe0Almm6Ll+YNQbzasX7765BNHI1o0sOYRghwExg7MG9dDQSiqsdwHuZmlFKMjLwQ3QcFtjlSxHTenLO3Lp7vfU09AOS41Ka+HC6CjIDIaqmguvIPgBtIgOcDhjVlMTQtarKOScumR/teCdpxoeNZGJCapjFt7Rcywrb2MYtnQBatCpZTzCkYCF+5suKRXf+6EvOmv0GSzwrhB/QpmGkBYZSpqvIZAlp8ZeMLFwKUH3z2gqWyd/+3F/5b1yRQQMCN8gQspeaKt+SAItSCxCiPjIjhDEkjRAMxmCZSbgZkYke537qdxl57KM8C0OkkD0ADohMXIlwgPIuBFFC9uS3p2XGflFSRAgpdxlZeBl84jUQr0ImjDTKGWZZBwE0eCkCL0J20UgjgGCwEDHNPjB86PbiilshfGRxOBCRD0tLCSWTnzMLO9yE4EbIzjIdTdmGpc8/rB4qK0c4FcKbqe7pyWZJ0k1lZhsnQnZq3EzV00dHDjupKXaFNGtcM7YA+Io+WzRIz2R0UxkWxY6QJgCHlCbfPlzAsZytj2ks5RCVZUGKCdkOoEt+Wl3RkCcjyzGv5wIS6aIynZJCQni7d0TTjPFaMFDg9wGNa8qRQn3KVEI+1rjPmKpm5KNzTemmMp7AZEK2AehXmz7bbC1SM/IZoH10pJ/K+hnyhXBrvZpmoBHAURf7HaV9daQ3v6Zk7hhWVr4AYDOAzzRNeKPHAyW7r459Yj/deUynMcyqqpY9/fXW+RTwkiF/ms5pADcd7nMbwAkBcfMM3wOwwOF+rys46TxCt+T72d2NG0YSg2fnC58ANDkbAZyVH41QNgAYVBTXNiMxeLYG6qawvagmGqGoTHOfwcAe6T8TvWwYlTC7OsALgRDNCIRoRiBEMwIhmhEI0YxAiGYEQjRDtZCY9iUyEaVpVi3kvuL4RKA0zSqF8Ad5TimMTxSnKO1KUCWEZ6hDVaYk0KFKigohbSUuI0uHiieKZQtp89kM+U7ZUmQKafHp4wpSH/eWJaTT5zPkD8g62GQI8cXqDTZok/HEsWgh+3Of2y4D2kU/0idKyEOaJdgqKLxSotXlfLFJESXkicKZGTrys6g0iRIyD8AvAFYLCq+UWC1yACOyD+Hrf1wAUCcwTN2pozzXiEqn6E59JoBvANQKDldHaimvM0WmTcawlydw2Oc1pY7yKFQGJJ4YxqiTXyEp/OlkBeVNyn0SmZdO5gC47rOOfjXlaY6sCGRfXKwA8LVP+pRaykuFzEhUXH7nR9P3AFYqiEsWKykP0mpGFlU3qKI0IlmlKD6RrKK0R1VEpvIW7uwSHXnVUdqVoHqSwz+K4xOB0jQH87I0IxCiGYEQzQiEaEYgRDMCIZoRCNGMQIhmBEI0gwuJK0xScKZemHiY1mzqUxThYgBLHO7zQOAzGnMBPOdwn8WC4rbDNjaSWVajQaEUp9wBsB7ALY/hLAVwHsB89VmwRXrhuGwf0q/xIl/z6f6105qVyxIKQ1cZjdlV/HI79V6N1yjk/dxlAMtc7LuM9lXZVzqhIXdxtvxR1kCxZUynkbl0o2ihgyQspH3mapqn7flrSE427O3TuKbwGZI/AlhuY9vltO08Belyw6T99lTnIQN2VmGeJqppskGhpfoW0DbVmuahaarVVQudGPZo3tH/RCOnfJbSbzp34D1T/VjsTL3X6esWFMJngJwDsCgnykX0P+mzQ1yyq9jqqtnzkGI0a7wgPz9pfJm+/6ZxB77bzus+7L7pkwdkarr8OBdwJee7jjQVaqZysVtDsuwK3j3lmGYnb5hwerW3S+PRl440OX3dh5vL7z0iXzXqY/bYbaZycXs/5KDdV/iUKc1URo7xcoOqq0yfui1Gq5e3EoUava1qzS/aJQGs8xKIj2jx+gCoVyGcoUBKGs8yIEgIAiliZEDwJAehL3ovIYS+2F9UDckyRH/fFhmoxuwTvdaJaCGc7+gyi9+br1YZSzTJEAIaffHrZG/JCFwDpK16JEsI5yK9uMdvzVe7zAUxZQrhXKKBwxqZkSikQ8aiZbnIFgKS4oea0i5bBhQJgQ+kKJEBhUJAUkqxo+cduJqVrQH8B6xBgBhvJFNDAAAAAElFTkSuQmCC', type: 'image',   options: { | ||||
|             src: 'data: image/png;base64iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAHVklEQVR4nO2dT2wUVRzHv2/2T5eSAlvFilwgQUH+eLACaUxEiJLAxdh44MDZi2ChUIrSFtoCgbbSP4GDdwgeEA8kRTAI0iIGBL1ITLxgLAlCsCKBYndnx7zd35pl2+7On/de387OJ9l00515/z7z/szMmzfs7869mD0yCjw2gZAB4VhAiln4/dUaRGdU18aOnzw9dn24ioGJj0soFsJr1z2yNm+qN2/fvRFL8XyMYqTmFfxZ+TwMc1xKDsL/f2Ms8xGeLwuIRpCKx99MHf/i4uPrw5GQ9jIAfsCMXfw2HkuOX03Wb1qLh4+uIGFJjzecPoS5iEhUTg1hDMaM2GuRk6cGMTQUCYmPQQq86CMAkkPDkQirGAzXf7Du34ejN9IHmETCRjQGPL6D+4NnYDEJDQmXbaY6on/dm2Vm/jHdZe0Almm6Ll+YNQbzasX7765BNHI1o0sOYRghwExg7MG9dDQSiqsdwHuZmlFKMjLwQ3QcFtjlSxHTenLO3Lp7vfU09AOS41Ka+HC6CjIDIaqmguvIPgBtIgOcDhjVlMTQtarKOScumR/teCdpxoeNZGJCapjFt7Rcywrb2MYtnQBatCpZTzCkYCF+5suKRXf+6EvOmv0GSzwrhB/QpmGkBYZSpqvIZAlp8ZeMLFwKUH3z2gqWyd/+3F/5b1yRQQMCN8gQspeaKt+SAItSCxCiPjIjhDEkjRAMxmCZSbgZkYke537qdxl57KM8C0OkkD0ADohMXIlwgPIuBFFC9uS3p2XGflFSRAgpdxlZeBl84jUQr0ImjDTKGWZZBwE0eCkCL0J20UgjgGCwEDHNPjB86PbiilshfGRxOBCRD0tLCSWTnzMLO9yE4EbIzjIdTdmGpc8/rB4qK0c4FcKbqe7pyWZJ0k1lZhsnQnZq3EzV00dHDjupKXaFNGtcM7YA+Io+WzRIz2R0UxkWxY6QJgCHlCbfPlzAsZytj2ks5RCVZUGKCdkOoEt+Wl3RkCcjyzGv5wIS6aIynZJCQni7d0TTjPFaMFDg9wGNa8qRQn3KVEI+1rjPmKpm5KNzTemmMp7AZEK2AehXmz7bbC1SM/IZoH10pJ/K+hnyhXBrvZpmoBHAURf7HaV9daQ3v6Zk7hhWVr4AYDOAzzRNeKPHAyW7r459Yj/deUynMcyqqpY9/fXW+RTwkiF/ms5pADcd7nMbwAkBcfMM3wOwwOF+rys46TxCt+T72d2NG0YSg2fnC58ANDkbAZyVH41QNgAYVBTXNiMxeLYG6qawvagmGqGoTHOfwcAe6T8TvWwYlTC7OsALgRDNCIRoRiBEMwIhmhEI0YxAiGYEQjRDtZCY9iUyEaVpVi3kvuL4RKA0zSqF8Ad5TimMTxSnKO1KUCWEZ6hDVaYk0KFKigohbSUuI0uHiieKZQtp89kM+U7ZUmQKafHp4wpSH/eWJaTT5zPkD8g62GQI8cXqDTZok/HEsWgh+3Of2y4D2kU/0idKyEOaJdgqKLxSotXlfLFJESXkicKZGTrys6g0iRIyD8AvAFYLCq+UWC1yACOyD+Hrf1wAUCcwTN2pozzXiEqn6E59JoBvANQKDldHaimvM0WmTcawlydw2Oc1pY7yKFQGJJ4YxqiTXyEp/OlkBeVNyn0SmZdO5gC47rOOfjXlaY6sCGRfXKwA8LVP+pRaykuFzEhUXH7nR9P3AFYqiEsWKykP0mpGFlU3qKI0IlmlKD6RrKK0R1VEpvIW7uwSHXnVUdqVoHqSwz+K4xOB0jQH87I0IxCiGYEQzQiEaEYgRDMCIZoRCNGMQIhmBEI0gwuJK0xScKZemHiY1mzqUxThYgBLHO7zQOAzGnMBPOdwn8WC4rbDNjaSWVajQaEUp9wBsB7ALY/hLAVwHsB89VmwRXrhuGwf0q/xIl/z6f6105qVyxIKQ1cZjdlV/HI79V6N1yjk/dxlAMtc7LuM9lXZVzqhIXdxtvxR1kCxZUynkbl0o2ihgyQspH3mapqn7flrSE427O3TuKbwGZI/AlhuY9vltO08Belyw6T99lTnIQN2VmGeJqppskGhpfoW0DbVmuahaarVVQudGPZo3tH/RCOnfJbSbzp34D1T/VjsTL3X6esWFMJngJwDsCgnykX0P+mzQ1yyq9jqqtnzkGI0a7wgPz9pfJm+/6ZxB77bzus+7L7pkwdkarr8OBdwJee7jjQVaqZysVtDsuwK3j3lmGYnb5hwerW3S+PRl440OX3dh5vL7z0iXzXqY/bYbaZycXs/5KDdV/iUKc1URo7xcoOqq0yfui1Gq5e3EoUava1qzS/aJQGs8xKIj2jx+gCoVyGcoUBKGs8yIEgIAiliZEDwJAehL3ovIYS+2F9UDckyRH/fFhmoxuwTvdaJaCGc7+gyi9+br1YZSzTJEAIaffHrZG/JCFwDpK16JEsI5yK9uMdvzVe7zAUxZQrhXKKBwxqZkSikQ8aiZbnIFgKS4oea0i5bBhQJgQ+kKJEBhUJAUkqxo+cduJqVrQH8B6xBgBhvJFNDAAAAAElFTkSuQmCC', | ||||
|             fit: 'none' | ||||
|             }}, | ||||
|         ]), | ||||
|         new hiprint.PrintElementTypeGroup("客户", [ | ||||
|           { | ||||
|             tid: 'bProviderModule.khname', title: '客户名称', data: '高级客户', type: 'text', | ||||
|             options: { | ||||
|               field: 'name', | ||||
|               testData: '高级客户', | ||||
|               height: 16, | ||||
|               fontSize: 6.75, | ||||
|               fontWeight: "700", | ||||
|               textAlign: "left", | ||||
|               textContentVerticalAlign: "middle" | ||||
|             } | ||||
|           }, | ||||
|           { | ||||
|             tid: 'bProviderModule.tel', title: '客户电话', data: '18888888888', type: 'text', | ||||
|             options: { | ||||
|               field: 'tel', | ||||
|               testData: '18888888888', | ||||
|               height: 16, | ||||
|               fontSize: 6.75, | ||||
|               fontWeight: "700", | ||||
|               textAlign: "left", | ||||
|               textContentVerticalAlign: "middle" | ||||
|             } | ||||
|           }, | ||||
|         ]), | ||||
|         new hiprint.PrintElementTypeGroup("表格/其他", [ | ||||
|           { | ||||
|             tid: 'bProviderModule.table', title: '订单数据', | ||||
|             type: 'table', | ||||
|             options: { | ||||
|               field: 'table', | ||||
|               fields: [ | ||||
|                 {text: '名称', field: 'NAME'}, | ||||
|                 {text: '数量', field: 'SL'}, | ||||
|                 {text: '规格', field: 'GG'}, | ||||
|                 {text: '条码', field: 'TM'}, | ||||
|                 {text: '单价', field: 'DJ'}, | ||||
|                 {text: '金额', field: 'JE'}, | ||||
|                 {text: '备注', field: 'DETAIL'}, | ||||
|               ], | ||||
|             }, | ||||
|             editable: true, | ||||
|             columnDisplayEditable: true,//列显示是否能编辑 | ||||
|             columnDisplayIndexEditable: true,//列顺序显示是否能编辑 | ||||
|             columnTitleEditable: true,//列标题是否能编辑 | ||||
|             columnResizable: true, //列宽是否能调整 | ||||
|             columnAlignEditable: true,//列对齐是否调整 | ||||
|             columns: [ | ||||
|               [ | ||||
|                 {title: '名称', align: 'center', field: 'NAME', width: 100}, | ||||
|                 {title: '数量', align: 'center', field: 'SL', width: 100}, | ||||
|                 {title: '条码', align: 'center', field: 'TM', width: 100}, | ||||
|                 {title: '规格', align: 'center', field: 'GG', width: 100}, | ||||
|                 {title: '单价', align: 'center', field: 'DJ', width: 100}, | ||||
|                 {title: '金额', align: 'center', field: 'JE', width: 100}, | ||||
|                 {title: '备注', align: 'center', field: 'DETAIL', width: 100}, | ||||
|               ] | ||||
|             ], | ||||
|             footerFormatter: function (options, rows, data, currentPageGridRowsData) { | ||||
|               if (data && data['totalCap']) { | ||||
|                 return `<td style="padding:0 10px" colspan="100">${'应收金额大写: ' + data['totalCap']}</td>` | ||||
|               } | ||||
|               return '<td style="padding:0 10px" colspan="100">应收金额大写: </td>' | ||||
|             }, | ||||
|           }, | ||||
|           {tid: 'bProviderModule.customText', title: '文本', customText: '自定义文本', custom: true, type: 'text'}, | ||||
|           { | ||||
|             tid: 'bProviderModule.longText', title: '长文本', type: 'longText', options: { | ||||
|               field: 'test.longText', | ||||
|               width: 200, | ||||
|               testData: '长文本分页/不分页测试' | ||||
|             }, | ||||
|           } | ||||
|         ]), | ||||
|         new hiprint.PrintElementTypeGroup("辅助", [ | ||||
|           { | ||||
|             tid: 'bProviderModule.hline', | ||||
|             title: '横线', | ||||
|             type: 'hline' | ||||
|           }, | ||||
|           { | ||||
|             tid: 'bProviderModule.vline', | ||||
|             title: '竖线', | ||||
|             type: 'vline' | ||||
|           }, | ||||
|           { | ||||
|             tid: 'bProviderModule.rect', | ||||
|             title: '矩形', | ||||
|             type: 'rect' | ||||
|           }, | ||||
|           { | ||||
|             tid: 'bProviderModule.oval', | ||||
|             title: '椭圆', | ||||
|             type: 'oval' | ||||
|           } | ||||
|         ]) | ||||
|       ] | ||||
|     ); | ||||
|   }; | ||||
|   return { | ||||
|     addElementTypes: addElementTypes | ||||
|   }; | ||||
| }; | ||||
|  | ||||
| // type: 1供货商 2经销商 | ||||
| export default [{ | ||||
|   name: 'A设计', | ||||
|   value: 'aProviderModule', | ||||
|   type: 1, | ||||
|   f: aProvider() | ||||
| }, { | ||||
|   name: 'B设计', | ||||
|   value: 'bProviderModule', | ||||
|   type: 2, | ||||
|   f: bProvider() | ||||
| }] | ||||
| @@ -6,7 +6,9 @@ | ||||
| --> | ||||
|  | ||||
| <template> | ||||
| 	<div ref="dataBoard" class=""></div> | ||||
| 	<div ref="dataBoard" class="data-board"> | ||||
| 		<el-button type="text" @click="goback" class="go-back--btn">返回</el-button> | ||||
| 	</div> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| @@ -24,39 +26,42 @@ export default { | ||||
| 			mainFooter: null, // dom | ||||
| 		}; | ||||
| 	}, | ||||
| 	mounted() { | ||||
| 		this.$nextTick(() => { | ||||
| 			this.modify(); | ||||
| 		}); | ||||
| 	}, | ||||
| 	activated() { | ||||
| 		this.modify(); | ||||
| 	}, | ||||
| 	deactivated() { | ||||
| 		this.recover(); | ||||
| 	}, | ||||
| 	beforeDestroy() { | ||||
| 		this.recover(); | ||||
| 	}, | ||||
| 	// mounted() { | ||||
| 	// 	this.$nextTick(() => { | ||||
| 	// 		this.modify(); | ||||
| 	// 	}); | ||||
| 	// }, | ||||
| 	// activated() { | ||||
| 	// 	this.modify(); | ||||
| 	// }, | ||||
| 	// deactivated() { | ||||
| 	// 	this.recover(); | ||||
| 	// }, | ||||
| 	// beforeDestroy() { | ||||
| 	// 	this.recover(); | ||||
| 	// }, | ||||
| 	methods: { | ||||
| 		modify() { | ||||
| 			// 在这个页面临时修改下父类的margin,结束时需还原 | ||||
| 			this.appMain = document.querySelector('.app-main'); | ||||
| 			// this.appMain.style.minHeight = 'calc(100vh - 90px)'; | ||||
| 			this.appMain.style.margin = 0; | ||||
| 			// 在这个页面临时删除 main-footer 元素,结束时需还原 | ||||
| 			// this.mainFooter = document.querySelector('.main-footer').cloneNode(true); | ||||
| 			// document.querySelector('.main-footer').remove(); | ||||
|             this.$refs.dataBoard.classList.add('data-board'); | ||||
| 		}, | ||||
| 		recover() { | ||||
|             this.$refs.dataBoard.classList.remove('data-board'); | ||||
| 			this.$nextTick(() => { | ||||
| 				this.appMain.style.margin = this.parentStyle.margin; | ||||
| 				// this.appMain.style.minHeight = this.parentStyle.minHeight; | ||||
| 				// this.appMain.insertAdjacentElement('afterend', this.mainFooter); | ||||
| 			}); | ||||
| 		}, | ||||
| 		// modify() { | ||||
| 		// 	// 在这个页面临时修改下父类的margin,结束时需还原 | ||||
| 		// 	this.appMain = document.querySelector('.app-main'); | ||||
| 		// 	// this.appMain.style.minHeight = 'calc(100vh - 90px)'; | ||||
| 		// 	this.appMain.style.margin = 0; | ||||
| 		// 	// 在这个页面临时删除 main-footer 元素,结束时需还原 | ||||
| 		// 	// this.mainFooter = document.querySelector('.main-footer').cloneNode(true); | ||||
| 		// 	// document.querySelector('.main-footer').remove(); | ||||
|         //     this.$refs.dataBoard.classList.add('data-board'); | ||||
| 		// }, | ||||
| 		// recover() { | ||||
|         //     this.$refs.dataBoard.classList.remove('data-board'); | ||||
| 		// 	this.$nextTick(() => { | ||||
| 		// 		this.appMain.style.margin = this.parentStyle.margin; | ||||
| 		// 		// this.appMain.style.minHeight = this.parentStyle.minHeight; | ||||
| 		// 		// this.appMain.insertAdjacentElement('afterend', this.mainFooter); | ||||
| 		// 	}); | ||||
| 		// }, | ||||
| 		goback() { | ||||
| 			this.$router.go(-1); | ||||
| 		} | ||||
| 	}, | ||||
| }; | ||||
| </script> | ||||
| @@ -71,4 +76,25 @@ export default { | ||||
| 	background: url('../../../assets/images/DataBoard.png') 100% 100% / contain | ||||
| 		no-repeat; | ||||
| } | ||||
|  | ||||
| .go-back--btn { | ||||
| 	position: fixed; | ||||
| 	top: 28px; | ||||
| 	left: 24px; | ||||
| 	color: #fff; | ||||
| 	font-size: 18px; | ||||
| 	letter-spacing: 6px; | ||||
|  | ||||
| 	&:hover { | ||||
| 		text-decoration: underline; | ||||
| 	} | ||||
|  | ||||
| 	&::after { | ||||
| 		content: "\2BAA"; | ||||
| 		position: absolute; | ||||
| 		top: 6px; | ||||
| 		right: -26px; | ||||
| 		font-size: 24px; | ||||
| 	} | ||||
| } | ||||
| </style> | ||||
|   | ||||
							
								
								
									
										214
									
								
								src/views/base/equipmentAttr/index.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										214
									
								
								src/views/base/equipmentAttr/index.vue
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,214 @@ | ||||
| <template> | ||||
|   <div class="app-container"> | ||||
|  | ||||
|     <!-- 搜索工作栏 --> | ||||
|     <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> | ||||
|       <el-form-item label="设备id" prop="equipmentId"> | ||||
|         <el-input v-model="queryParams.equipmentId" placeholder="请输入设备id" clearable @keyup.enter.native="handleQuery"/> | ||||
|       </el-form-item> | ||||
|       <el-form-item> | ||||
|         <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button> | ||||
|         <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button> | ||||
|       </el-form-item> | ||||
|     </el-form> | ||||
|  | ||||
|     <!-- 操作工具栏 --> | ||||
|     <el-row :gutter="10" class="mb8"> | ||||
|       <el-col :span="1.5"> | ||||
|         <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" | ||||
|                    v-hasPermi="['base:equipment-attr:create']">新增</el-button> | ||||
|       </el-col> | ||||
|       <el-col :span="1.5"> | ||||
|         <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading" | ||||
|                    v-hasPermi="['base:equipment-attr:export']">导出</el-button> | ||||
|       </el-col> | ||||
|       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> | ||||
|     </el-row> | ||||
|  | ||||
|     <!-- 列表 --> | ||||
|     <el-table v-loading="loading" :data="list"> | ||||
|       <el-table-column label="ID" align="center" prop="id" /> | ||||
|       <el-table-column label="设备id" align="center" prop="equipmentId" /> | ||||
|       <el-table-column label="属性名称" align="center" prop="name" /> | ||||
|       <el-table-column label="属性值" align="center" prop="value" /> | ||||
|       <el-table-column label="创建时间" align="center" prop="createTime" width="180"> | ||||
|         <template v-slot="scope"> | ||||
|           <span>{{ parseTime(scope.row.createTime) }}</span> | ||||
|         </template> | ||||
|       </el-table-column> | ||||
|       <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> | ||||
|         <template v-slot="scope"> | ||||
|           <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" | ||||
|                      v-hasPermi="['base:equipment-attr:update']">修改</el-button> | ||||
|           <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" | ||||
|                      v-hasPermi="['base:equipment-attr:delete']">删除</el-button> | ||||
|         </template> | ||||
|       </el-table-column> | ||||
|     </el-table> | ||||
|     <!-- 分页组件 --> | ||||
|     <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" | ||||
|                 @pagination="getList"/> | ||||
|  | ||||
|     <!-- 对话框(添加 / 修改) --> | ||||
|     <el-dialog :title="title" :visible.sync="open" width="500px" v-dialogDrag append-to-body> | ||||
|       <el-form ref="form" :model="form" :rules="rules" label-width="80px"> | ||||
|         <el-form-item label="设备id" prop="equipmentId"> | ||||
|           <el-input v-model="form.equipmentId" placeholder="请输入设备id" /> | ||||
|         </el-form-item> | ||||
|         <el-form-item label="属性名称" prop="name"> | ||||
|           <el-input v-model="form.name" placeholder="请输入属性名称" /> | ||||
|         </el-form-item> | ||||
|         <el-form-item label="属性值" prop="value"> | ||||
|           <el-input v-model="form.value" placeholder="请输入属性值" /> | ||||
|         </el-form-item> | ||||
|       </el-form> | ||||
|       <div slot="footer" class="dialog-footer"> | ||||
|         <el-button type="primary" @click="submitForm">确 定</el-button> | ||||
|         <el-button @click="cancel">取 消</el-button> | ||||
|       </div> | ||||
|     </el-dialog> | ||||
|   </div> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import { createEquipmentAttr, updateEquipmentAttr, deleteEquipmentAttr, getEquipmentAttr, getEquipmentAttrPage, exportEquipmentAttrExcel } from "@/api/base/equipmentAttr"; | ||||
|  | ||||
| export default { | ||||
|   name: "EquipmentAttr", | ||||
|   components: { | ||||
|   }, | ||||
|   data() { | ||||
|     return { | ||||
|       // 遮罩层 | ||||
|       loading: true, | ||||
|       // 导出遮罩层 | ||||
|       exportLoading: false, | ||||
|       // 显示搜索条件 | ||||
|       showSearch: true, | ||||
|       // 总条数 | ||||
|       total: 0, | ||||
|       // 设备属性列表 | ||||
|       list: [], | ||||
|       // 弹出层标题 | ||||
|       title: "", | ||||
|       // 是否显示弹出层 | ||||
|       open: false, | ||||
|       // 查询参数 | ||||
|       queryParams: { | ||||
|         pageNo: 1, | ||||
|         pageSize: 10, | ||||
|         equipmentId: null, | ||||
|       }, | ||||
|       // 表单参数 | ||||
|       form: {}, | ||||
|       // 表单校验 | ||||
|       rules: { | ||||
|         equipmentId: [{ required: true, message: "设备id不能为空", trigger: "blur" }], | ||||
|       } | ||||
|     }; | ||||
|   }, | ||||
|   created() { | ||||
|     this.getList(); | ||||
|   }, | ||||
|   methods: { | ||||
|     /** 查询列表 */ | ||||
|     getList() { | ||||
|       this.loading = true; | ||||
|       // 执行查询 | ||||
|       getEquipmentAttrPage(this.queryParams).then(response => { | ||||
|         this.list = response.data.list; | ||||
|         this.total = response.data.total; | ||||
|         this.loading = false; | ||||
|       }); | ||||
|     }, | ||||
|     /** 取消按钮 */ | ||||
|     cancel() { | ||||
|       this.open = false; | ||||
|       this.reset(); | ||||
|     }, | ||||
|     /** 表单重置 */ | ||||
|     reset() { | ||||
|       this.form = { | ||||
|         id: undefined, | ||||
|         equipmentId: undefined, | ||||
|         name: undefined, | ||||
|         value: undefined, | ||||
|       }; | ||||
|       this.resetForm("form"); | ||||
|     }, | ||||
|     /** 搜索按钮操作 */ | ||||
|     handleQuery() { | ||||
|       this.queryParams.pageNo = 1; | ||||
|       this.getList(); | ||||
|     }, | ||||
|     /** 重置按钮操作 */ | ||||
|     resetQuery() { | ||||
|       this.resetForm("queryForm"); | ||||
|       this.handleQuery(); | ||||
|     }, | ||||
|     /** 新增按钮操作 */ | ||||
|     handleAdd() { | ||||
|       this.reset(); | ||||
|       this.open = true; | ||||
|       this.title = "添加设备属性"; | ||||
|     }, | ||||
|     /** 修改按钮操作 */ | ||||
|     handleUpdate(row) { | ||||
|       this.reset(); | ||||
|       const id = row.id; | ||||
|       getEquipmentAttr(id).then(response => { | ||||
|         this.form = response.data; | ||||
|         this.open = true; | ||||
|         this.title = "修改设备属性"; | ||||
|       }); | ||||
|     }, | ||||
|     /** 提交按钮 */ | ||||
|     submitForm() { | ||||
|       this.$refs["form"].validate(valid => { | ||||
|         if (!valid) { | ||||
|           return; | ||||
|         } | ||||
|         // 修改的提交 | ||||
|         if (this.form.id != null) { | ||||
|           updateEquipmentAttr(this.form).then(response => { | ||||
|             this.$modal.msgSuccess("修改成功"); | ||||
|             this.open = false; | ||||
|             this.getList(); | ||||
|           }); | ||||
|           return; | ||||
|         } | ||||
|         // 添加的提交 | ||||
|         createEquipmentAttr(this.form).then(response => { | ||||
|           this.$modal.msgSuccess("新增成功"); | ||||
|           this.open = false; | ||||
|           this.getList(); | ||||
|         }); | ||||
|       }); | ||||
|     }, | ||||
|     /** 删除按钮操作 */ | ||||
|     handleDelete(row) { | ||||
|       const id = row.id; | ||||
|       this.$modal.confirm('是否确认删除设备属性编号为"' + id + '"的数据项?').then(function() { | ||||
|           return deleteEquipmentAttr(id); | ||||
|         }).then(() => { | ||||
|           this.getList(); | ||||
|           this.$modal.msgSuccess("删除成功"); | ||||
|         }).catch(() => {}); | ||||
|     }, | ||||
|     /** 导出按钮操作 */ | ||||
|     handleExport() { | ||||
|       // 处理查询参数 | ||||
|       let params = {...this.queryParams}; | ||||
|       params.pageNo = undefined; | ||||
|       params.pageSize = undefined; | ||||
|       this.$modal.confirm('是否确认导出所有设备属性数据项?').then(() => { | ||||
|           this.exportLoading = true; | ||||
|           return exportEquipmentAttrExcel(params); | ||||
|         }).then(response => { | ||||
|           this.$download.excel(response, '设备属性.xls'); | ||||
|           this.exportLoading = false; | ||||
|         }).catch(() => {}); | ||||
|     } | ||||
|   } | ||||
| }; | ||||
| </script> | ||||
| @@ -38,7 +38,7 @@ | ||||
| 			@close="cancel" | ||||
| 			@cancel="cancel" | ||||
| 			@confirm="submitForm"> | ||||
| 			<DialogForm v-if="open" ref="form" :dataForm="form" :rows="rows" /> | ||||
| 			<DialogForm v-if="open" ref="form" v-model="form" :rows="rows" /> | ||||
| 		</base-dialog> | ||||
| 
 | ||||
| 		<!-- 抽屉 详情 --> | ||||
| @@ -118,19 +118,19 @@ export default { | ||||
| 		return { | ||||
| 			searchBarKeys: ['groupId', 'equipmentName'], | ||||
| 			tableBtn: [ | ||||
| 				this.$auth.hasPermi('equipment:bind-group:update') | ||||
| 				this.$auth.hasPermi('base:equipment-bind-group:update') | ||||
| 					? { | ||||
| 							type: 'detail', | ||||
| 							btnName: '查看报警', | ||||
| 					  } | ||||
| 					: undefined, | ||||
| 				this.$auth.hasPermi('equipment:bind-group:update') | ||||
| 				this.$auth.hasPermi('base:equipment-bind-group:update') | ||||
| 					? { | ||||
| 							type: 'edit', | ||||
| 							btnName: '修改', | ||||
| 					  } | ||||
| 					: undefined, | ||||
| 				this.$auth.hasPermi('equipment:bind-group:delete') | ||||
| 				this.$auth.hasPermi('base:equipment-bind-group:delete') | ||||
| 					? { | ||||
| 							type: 'delete', | ||||
| 							btnName: '删除', | ||||
| @@ -199,7 +199,7 @@ export default { | ||||
| 					type: 'separate', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: this.$auth.hasPermi('equipment:bind-group:create') | ||||
| 					type: this.$auth.hasPermi('base:equipment-bind-group:create') | ||||
| 						? 'button' | ||||
| 						: '', | ||||
| 					btnName: '新增', | ||||
| @@ -219,7 +219,7 @@ export default { | ||||
| 					{ | ||||
| 						select: true, | ||||
| 						label: '设备', | ||||
| 						url: '/base/core-equipment/page?pageNo=1&pageSize=100', | ||||
| 						url: '/base/equipment/page?pageNo=1&pageSize=100', | ||||
| 						prop: 'equipmentId', | ||||
| 						bind: { | ||||
| 							filterable: true, | ||||
| @@ -278,7 +278,7 @@ export default { | ||||
| 						input: true, | ||||
| 						label: '设备分组编码', | ||||
| 						prop: 'code', | ||||
| 						// url: '/base/core-equipment/getCode', | ||||
| 						// url: '/base/equipment/getCode', | ||||
| 					}, | ||||
| 				], | ||||
| 			], | ||||
| @@ -191,7 +191,7 @@ export default { | ||||
| 		// 获取设备列表 | ||||
| 		async getEquipmentList() { | ||||
| 			const response = await this.$axios( | ||||
| 				'/base/core-equipment/page?pageNo=1&pageSize=100' | ||||
| 				'/base/equipment/page?pageNo=1&pageSize=100' | ||||
| 			); | ||||
| 			this.equipmentList = response.data.list.map((item) => ({ | ||||
| 				label: item.name, | ||||
|   | ||||
| @@ -192,7 +192,7 @@ export default { | ||||
| 					{ | ||||
| 						select: true, | ||||
| 						label: '设备', | ||||
| 						url: '/base/core-equipment/page?pageNo=1&pageSize=100', | ||||
| 						url: '/base/equipment/page?pageNo=1&pageSize=100', | ||||
| 						prop: 'equipmentId', | ||||
| 						rules: [{ required: true, message: '不能为空', trigger: 'blur' }], | ||||
| 					}, | ||||
|   | ||||
							
								
								
									
										225
									
								
								src/views/base/equipmentFile/index.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										225
									
								
								src/views/base/equipmentFile/index.vue
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,225 @@ | ||||
| <template> | ||||
|   <div class="app-container"> | ||||
|  | ||||
|     <!-- 搜索工作栏 --> | ||||
|     <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> | ||||
|       <el-form-item label="设备ID" prop="equipmentId"> | ||||
|         <el-input v-model="queryParams.equipmentId" placeholder="请输入设备ID" clearable @keyup.enter.native="handleQuery"/> | ||||
|       </el-form-item> | ||||
|       <el-form-item> | ||||
|         <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button> | ||||
|         <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button> | ||||
|       </el-form-item> | ||||
|     </el-form> | ||||
|  | ||||
|     <!-- 操作工具栏 --> | ||||
|     <el-row :gutter="10" class="mb8"> | ||||
|       <el-col :span="1.5"> | ||||
|         <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" | ||||
|                    v-hasPermi="['base:equipment-file:create']">新增</el-button> | ||||
|       </el-col> | ||||
|       <el-col :span="1.5"> | ||||
|         <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading" | ||||
|                    v-hasPermi="['base:equipment-file:export']">导出</el-button> | ||||
|       </el-col> | ||||
|       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> | ||||
|     </el-row> | ||||
|  | ||||
|     <!-- 列表 --> | ||||
|     <el-table v-loading="loading" :data="list"> | ||||
|       <el-table-column label="id" align="center" prop="id" /> | ||||
|       <el-table-column label="设备ID" align="center" prop="equipmentId" /> | ||||
|       <el-table-column label="文件类型 1.图片 2.设备资料" align="center" prop="fileType"> | ||||
|         <template v-slot="scope"> | ||||
|           <dict-tag :type="DICT_TYPE.EQU_FILE_TYPE" :value="scope.row.fileType" /> | ||||
|         </template> | ||||
|       </el-table-column> | ||||
|       <el-table-column label="原始文件名" align="center" prop="fileName" /> | ||||
|       <el-table-column label="文件url" align="center" prop="fileUrl" /> | ||||
|       <el-table-column label="创建时间" align="center" prop="createTime" width="180"> | ||||
|         <template v-slot="scope"> | ||||
|           <span>{{ parseTime(scope.row.createTime) }}</span> | ||||
|         </template> | ||||
|       </el-table-column> | ||||
|       <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> | ||||
|         <template v-slot="scope"> | ||||
|           <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" | ||||
|                      v-hasPermi="['base:equipment-file:update']">修改</el-button> | ||||
|           <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" | ||||
|                      v-hasPermi="['base:equipment-file:delete']">删除</el-button> | ||||
|         </template> | ||||
|       </el-table-column> | ||||
|     </el-table> | ||||
|     <!-- 分页组件 --> | ||||
|     <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" | ||||
|                 @pagination="getList"/> | ||||
|  | ||||
|     <!-- 对话框(添加 / 修改) --> | ||||
|     <el-dialog :title="title" :visible.sync="open" width="500px" v-dialogDrag append-to-body> | ||||
|       <el-form ref="form" :model="form" :rules="rules" label-width="80px"> | ||||
|         <el-form-item label="设备ID" prop="equipmentId"> | ||||
|           <el-input v-model="form.equipmentId" placeholder="请输入设备ID" /> | ||||
|         </el-form-item> | ||||
|         <el-form-item label="文件类型 1.图片 2.设备资料" prop="fileType"> | ||||
|           <el-select v-model="form.fileType" placeholder="请选择文件类型 1.图片 2.设备资料"> | ||||
|             <el-option v-for="dict in this.getDictDatas(DICT_TYPE.EQU_FILE_TYPE)" | ||||
|                        :key="dict.value" :label="dict.label" :value="dict.value" /> | ||||
|           </el-select> | ||||
|         </el-form-item> | ||||
|         <el-form-item label="原始文件名" prop="fileName"> | ||||
|           <el-input v-model="form.fileName" placeholder="请输入原始文件名" /> | ||||
|         </el-form-item> | ||||
|         <el-form-item label="文件url" prop="fileUrl"> | ||||
|           <el-input v-model="form.fileUrl" placeholder="请输入文件url" /> | ||||
|         </el-form-item> | ||||
|       </el-form> | ||||
|       <div slot="footer" class="dialog-footer"> | ||||
|         <el-button type="primary" @click="submitForm">确 定</el-button> | ||||
|         <el-button @click="cancel">取 消</el-button> | ||||
|       </div> | ||||
|     </el-dialog> | ||||
|   </div> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import { createEquipmentFile, updateEquipmentFile, deleteEquipmentFile, getEquipmentFile, getEquipmentFilePage, exportEquipmentFileExcel } from "@/api/base/equipmentFile"; | ||||
|  | ||||
| export default { | ||||
|   name: "EquipmentFile", | ||||
|   components: { | ||||
|   }, | ||||
|   data() { | ||||
|     return { | ||||
|       // 遮罩层 | ||||
|       loading: true, | ||||
|       // 导出遮罩层 | ||||
|       exportLoading: false, | ||||
|       // 显示搜索条件 | ||||
|       showSearch: true, | ||||
|       // 总条数 | ||||
|       total: 0, | ||||
|       // 设备文件对应列表 | ||||
|       list: [], | ||||
|       // 弹出层标题 | ||||
|       title: "", | ||||
|       // 是否显示弹出层 | ||||
|       open: false, | ||||
|       // 查询参数 | ||||
|       queryParams: { | ||||
|         pageNo: 1, | ||||
|         pageSize: 10, | ||||
|         equipmentId: null, | ||||
|       }, | ||||
|       // 表单参数 | ||||
|       form: {}, | ||||
|       // 表单校验 | ||||
|       rules: { | ||||
|       } | ||||
|     }; | ||||
|   }, | ||||
|   created() { | ||||
|     this.getList(); | ||||
|   }, | ||||
|   methods: { | ||||
|     /** 查询列表 */ | ||||
|     getList() { | ||||
|       this.loading = true; | ||||
|       // 执行查询 | ||||
|       getEquipmentFilePage(this.queryParams).then(response => { | ||||
|         this.list = response.data.list; | ||||
|         this.total = response.data.total; | ||||
|         this.loading = false; | ||||
|       }); | ||||
|     }, | ||||
|     /** 取消按钮 */ | ||||
|     cancel() { | ||||
|       this.open = false; | ||||
|       this.reset(); | ||||
|     }, | ||||
|     /** 表单重置 */ | ||||
|     reset() { | ||||
|       this.form = { | ||||
|         id: undefined, | ||||
|         equipmentId: undefined, | ||||
|         fileType: undefined, | ||||
|         fileName: undefined, | ||||
|         fileUrl: undefined, | ||||
|       }; | ||||
|       this.resetForm("form"); | ||||
|     }, | ||||
|     /** 搜索按钮操作 */ | ||||
|     handleQuery() { | ||||
|       this.queryParams.pageNo = 1; | ||||
|       this.getList(); | ||||
|     }, | ||||
|     /** 重置按钮操作 */ | ||||
|     resetQuery() { | ||||
|       this.resetForm("queryForm"); | ||||
|       this.handleQuery(); | ||||
|     }, | ||||
|     /** 新增按钮操作 */ | ||||
|     handleAdd() { | ||||
|       this.reset(); | ||||
|       this.open = true; | ||||
|       this.title = "添加设备文件对应"; | ||||
|     }, | ||||
|     /** 修改按钮操作 */ | ||||
|     handleUpdate(row) { | ||||
|       this.reset(); | ||||
|       const id = row.id; | ||||
|       getEquipmentFile(id).then(response => { | ||||
|         this.form = response.data; | ||||
|         this.open = true; | ||||
|         this.title = "修改设备文件对应"; | ||||
|       }); | ||||
|     }, | ||||
|     /** 提交按钮 */ | ||||
|     submitForm() { | ||||
|       this.$refs["form"].validate(valid => { | ||||
|         if (!valid) { | ||||
|           return; | ||||
|         } | ||||
|         // 修改的提交 | ||||
|         if (this.form.id != null) { | ||||
|           updateEquipmentFile(this.form).then(response => { | ||||
|             this.$modal.msgSuccess("修改成功"); | ||||
|             this.open = false; | ||||
|             this.getList(); | ||||
|           }); | ||||
|           return; | ||||
|         } | ||||
|         // 添加的提交 | ||||
|         createEquipmentFile(this.form).then(response => { | ||||
|           this.$modal.msgSuccess("新增成功"); | ||||
|           this.open = false; | ||||
|           this.getList(); | ||||
|         }); | ||||
|       }); | ||||
|     }, | ||||
|     /** 删除按钮操作 */ | ||||
|     handleDelete(row) { | ||||
|       const id = row.id; | ||||
|       this.$modal.confirm('是否确认删除设备文件对应编号为"' + id + '"的数据项?').then(function() { | ||||
|           return deleteEquipmentFile(id); | ||||
|         }).then(() => { | ||||
|           this.getList(); | ||||
|           this.$modal.msgSuccess("删除成功"); | ||||
|         }).catch(() => {}); | ||||
|     }, | ||||
|     /** 导出按钮操作 */ | ||||
|     handleExport() { | ||||
|       // 处理查询参数 | ||||
|       let params = {...this.queryParams}; | ||||
|       params.pageNo = undefined; | ||||
|       params.pageSize = undefined; | ||||
|       this.$modal.confirm('是否确认导出所有设备文件对应数据项?').then(() => { | ||||
|           this.exportLoading = true; | ||||
|           return exportEquipmentFileExcel(params); | ||||
|         }).then(response => { | ||||
|           this.$download.excel(response, '设备文件对应.xls'); | ||||
|           this.exportLoading = false; | ||||
|         }).catch(() => {}); | ||||
|     } | ||||
|   } | ||||
| }; | ||||
| </script> | ||||
| @@ -36,7 +36,7 @@ | ||||
| 							v-if="showForm" | ||||
| 							ref="form" | ||||
| 							:disabled="mode.includes('detail')" | ||||
| 							:dataForm="form" | ||||
| 							v-model="form" | ||||
| 							:rows="formRows" /> | ||||
| 					</div> | ||||
| 
 | ||||
| @@ -21,7 +21,7 @@ | ||||
| 						:disabled="disabled" | ||||
| 						v-model="dataForm.code" | ||||
| 						@change="$emit('update', dataForm)" | ||||
| 						placeholder="请输入报警编码" /> | ||||
| 						placeholder="请输入工段排序" /> | ||||
| 				</el-form-item> | ||||
| 				<!-- 				 | ||||
| 				<el-form-item | ||||
| @@ -38,7 +38,7 @@ | ||||
| 			@close="cancel" | ||||
| 			@cancel="cancel" | ||||
| 			@confirm="submitForm"> | ||||
| 			<DialogForm v-if="open" ref="form" :dataForm="form" :rows="rows" /> | ||||
| 			<DialogForm v-if="open" ref="form" v-model="form" :rows="rows"/> | ||||
| 		</base-dialog> | ||||
| 
 | ||||
| 		<!-- 抽屉 详情 --> | ||||
| @@ -58,7 +58,7 @@ | ||||
| 					queryParams: { id: alarmForm.id }, | ||||
| 				}, | ||||
| 				{ | ||||
| 					name: '报警明细', | ||||
| 					name: '属性列表', | ||||
| 					key: 'attrs', | ||||
| 					props: drawerListProps, | ||||
| 					url: '/base/equipment-group-alarm/page', | ||||
| @@ -72,13 +72,13 @@ | ||||
| 						pageSize: 10, | ||||
| 					}, | ||||
| 					tableBtn: [ | ||||
| 						this.$auth.hasPermi('equipment:alarm-group:update') | ||||
| 						this.$auth.hasPermi('base:equipment-group:update') | ||||
| 							? { | ||||
| 									type: 'edit', | ||||
| 									btnName: '修改', | ||||
| 							  } | ||||
| 							: undefined, | ||||
| 						this.$auth.hasPermi('equipment:alarm-group:delete') | ||||
| 						this.$auth.hasPermi('base:equipment-group:delete') | ||||
| 							? { | ||||
| 									type: 'delete', | ||||
| 									btnName: '删除', | ||||
| @@ -119,19 +119,19 @@ export default { | ||||
| 			editMode: '', | ||||
| 			searchBarKeys: ['name', 'code'], | ||||
| 			tableBtn: [ | ||||
| 				this.$auth.hasPermi('equipment:alarm-group:update') | ||||
| 				this.$auth.hasPermi('base:equipment-group:update') | ||||
| 					? { | ||||
| 							type: 'detail', | ||||
| 							btnName: '查看报警', | ||||
| 					  } | ||||
| 					: undefined, | ||||
| 				this.$auth.hasPermi('equipment:alarm-group:update') | ||||
| 				this.$auth.hasPermi('base:equipment-group:update') | ||||
| 					? { | ||||
| 							type: 'edit', | ||||
| 							btnName: '修改', | ||||
| 					  } | ||||
| 					: undefined, | ||||
| 				this.$auth.hasPermi('equipment:alarm-group:delete') | ||||
| 				this.$auth.hasPermi('base:equipment-group:delete') | ||||
| 					? { | ||||
| 							type: 'delete', | ||||
| 							btnName: '删除', | ||||
| @@ -192,9 +192,9 @@ export default { | ||||
| 						input: true, | ||||
| 						label: '设备分组编码', | ||||
| 						prop: 'code', | ||||
| 						// url: '/base/core-equipment/getCode', | ||||
| 					}, | ||||
| 				], | ||||
| 						// url: '/base/equipment/getCode', | ||||
| 					} | ||||
| 				] | ||||
| 			], | ||||
| 			drawerListProps: [ | ||||
| 				{ | ||||
| @@ -250,7 +250,7 @@ export default { | ||||
| 					type: 'separate', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: this.$auth.hasPermi('equipment:alarm-group:create') | ||||
| 					type: this.$auth.hasPermi('base:equipment-group:create') | ||||
| 						? 'button' | ||||
| 						: '', | ||||
| 					btnName: '新增', | ||||
| @@ -259,7 +259,7 @@ export default { | ||||
| 					color: 'success', | ||||
| 				}, | ||||
| 				// { | ||||
| 				// 	type: this.$auth.hasPermi('equipment:alarm-group:export') ? 'button' : '', | ||||
| 				// 	type: this.$auth.hasPermi('base:equipment-group:export') ? 'button' : '', | ||||
| 				// 	btnName: '导出', | ||||
| 				// 	name: 'export', | ||||
| 				// 	color: 'warning', | ||||
| @@ -375,7 +375,7 @@ export default { | ||||
| 		handleAdd() { | ||||
| 			this.reset(); | ||||
| 			this.open = true; | ||||
| 			this.title = '添加设备分组'; | ||||
| 			this.title = '添加设备分组(用于同类型不同厂家的设备区分)'; | ||||
| 		}, | ||||
| 		/** 修改按钮操作 */ | ||||
| 		handleUpdate(row) { | ||||
| @@ -384,7 +384,7 @@ export default { | ||||
| 			getEquipmentGroup(id).then((response) => { | ||||
| 				this.form = response.data; | ||||
| 				this.open = true; | ||||
| 				this.title = '修改设备分组'; | ||||
| 				this.title = '修改设备分组(用于同类型不同厂家的设备区分)'; | ||||
| 			}); | ||||
| 		}, | ||||
| 		/** 提交按钮 */ | ||||
| @@ -445,13 +445,18 @@ export default { | ||||
| 			params.pageNo = undefined; | ||||
| 			params.pageSize = undefined; | ||||
| 			this.$modal | ||||
| 				.confirm('是否确认导出所有设备分组数据项?') | ||||
| 				.confirm( | ||||
| 					'是否确认导出所有设备分组(用于同类型不同厂家的设备区分)数据项?' | ||||
| 				) | ||||
| 				.then(() => { | ||||
| 					this.exportLoading = true; | ||||
| 					return exportEquipmentGroupExcel(params); | ||||
| 				}) | ||||
| 				.then((response) => { | ||||
| 					this.$download.excel(response, '设备分组.xls'); | ||||
| 					this.$download.excel( | ||||
| 						response, | ||||
| 						'设备分组(用于同类型不同厂家的设备区分).xls' | ||||
| 					); | ||||
| 					this.exportLoading = false; | ||||
| 				}) | ||||
| 				.catch(() => {}); | ||||
| @@ -38,7 +38,7 @@ | ||||
| 			@close="cancel" | ||||
| 			@cancel="cancel" | ||||
| 			@confirm="submitForm"> | ||||
| 			<DialogForm v-if="open" ref="form" :dataForm="form" :rows="rows" /> | ||||
| 			<DialogForm v-if="open" ref="form" v-model="form" :rows="rows" /> | ||||
| 		</base-dialog> | ||||
| 	</div> | ||||
| </template> | ||||
|   | ||||
| @@ -36,7 +36,7 @@ | ||||
| 							v-if="showForm" | ||||
| 							ref="form" | ||||
| 							:disabled="mode.includes('detail')" | ||||
| 							:dataForm="form" | ||||
| 							v-model="form" | ||||
| 							:rows="formRows" /> | ||||
| 					</div> | ||||
|  | ||||
|   | ||||
| @@ -38,7 +38,7 @@ | ||||
| 			@close="cancel" | ||||
| 			@cancel="cancel" | ||||
| 			@confirm="submitForm"> | ||||
| 			<DialogForm v-if="open" ref="form" :dataForm="form" :rows="rows" /> | ||||
| 			<DialogForm v-if="open" ref="form" v-model="form" :rows="rows" /> | ||||
| 		</base-dialog> | ||||
|  | ||||
| 		<!-- 抽屉 详情 --> | ||||
| @@ -247,7 +247,7 @@ export default { | ||||
| 						select: true, | ||||
| 						label: '设备', | ||||
| 						prop: 'equipmentId', | ||||
| 						url: '/base/core-equipment/page?pageNo=1&pageSize=99', | ||||
| 						url: '/base/equipment/page?pageNo=1&pageSize=99', | ||||
| 						rules: [{ required: true, message: '不能为空', trigger: 'blur' }], | ||||
| 						bind: { | ||||
| 							filterable: true, | ||||
| @@ -283,7 +283,7 @@ export default { | ||||
| 						input: true, | ||||
| 						label: '关联表名', | ||||
| 						prop: 'plcTableName', | ||||
| 						// url: '/base/core-equipment/getCode', | ||||
| 						// url: '/base/equipment/getCode', | ||||
| 					}, | ||||
| 				], | ||||
| 			], | ||||
| @@ -320,7 +320,7 @@ export default { | ||||
| 	methods: { | ||||
| 		async getEquipmentOptions() { | ||||
| 			const res = await this.$axios({ | ||||
| 				url: '/base/core-equipment/listAll', | ||||
| 				url: '/base/equipment/listAll', | ||||
| 				method: 'get', | ||||
| 			}); | ||||
| 			return res.data; | ||||
|   | ||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user