From 8abc9481eafeb715b39a4f4f8d6f628a642e6b53 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期三, 19 三月 2025 17:38:18 +0800
Subject: [PATCH] 优化AGV和输送线、产线对接逻辑
---
项目代码/WMS/WIDESEA_WMSClient/src/extension/basic/roadwayInfo.js | 110 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 108 insertions(+), 2 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/extension/basic/roadwayInfo.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/extension/basic/roadwayInfo.js"
index 0994897..5cb17ce 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/extension/basic/roadwayInfo.js"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/extension/basic/roadwayInfo.js"
@@ -17,19 +17,125 @@
methods: {
//涓嬮潰杩欎簺鏂规硶鍙互淇濈暀涔熷彲浠ュ垹闄�
onInit() {
+
+ let params = {
+ // MethodName: null,
+ // Remark: null,
+ Extra: null,
+ DelKeys: null
+ }
+ let enableStatusBtn = this.buttons.find(x => x.value == 'enableStatus');
+ if (enableStatusBtn) {
+ enableStatusBtn.data = [
+ {
+ name: '姝e父',
+ icon: 'el-icon-circle-check',
+ onClick: () => {
+ params.Extra = 0
+ this.enableStatus(params, "姝e父")
+ }
+ },
+ {
+ name: '鍙叆',
+ icon: 'el-icon-circle-plus-outline',
+ onClick: () => {
+ params.Extra = 1
+ this.enableStatus(params, "鍙叆")
+ }
+ },
+ {
+ name: '鍙嚭',
+ icon: 'el-icon-remove-outline',
+ onClick: () => {
+ // this.$message.info('鍙嚭');
+ params.Extra = 2
+ this.enableStatus(params, "鍙嚭")
+ }
+ },
+ {
+ name: '绂佺敤',
+ icon: 'el-icon-circle-close',
+ onClick: () => {
+ params.Extra = 3
+ this.enableStatus(params, "绂佺敤")
+ }
+ }
+ ]
+ }
+
+
+
+ //璁剧疆缂栬緫琛ㄥ崟鏍囩瀹藉害
+ this.boxOptions.labelWidth = 160;
+ //鏌ヨ琛ㄥ崟鏍囩瀹藉害
+ this.labelWidth = 160;
let enableBtn = this.buttons.find(x => x.value == 'Enable');
if (enableBtn) {
enableBtn.onClick = function () {
- this.$message.success('鑷畾涔夋寜閽偣鍑讳簨浠�');
+ let rows = this.$refs.table.getSelected();
+ if (rows.length == 0) return this.$error("璇烽�夋嫨宸烽亾!");
+ let keys = rows.map(x => {
+ return x[this.table.key];
+ });
+ if (!keys || keys.Length == 0) return this.$error("鏈幏鍙栧埌宸烽亾淇℃伅!");
+ this.$confirm("鏄惁纭瑕佸惎鐢ㄥ贩閬擄紵", "鎻愮ず", {
+ confirmButtonText: "纭",//纭鎸夐挳鏂囧瓧鏇存崲
+ cancelButtonText: "鍙栨秷",//鍙栨秷鎸夐挳鏂囧瓧鏇存崲
+ showClose: true,//鏄惁鏄剧ず鍙充笂瑙掑叧闂寜閽�
+ type: "warning",//鎻愮ず绫诲瀷 success:鎴愬姛/info:淇℃伅/warning:璀﹀憡/error:鎶ラ敊
+ }).then(() => {
+ this.http.post("api/RoadwayInfo/RoadwayEnableStatus", keys, "姝e湪鍚敤宸烽亾....").then(x => {
+ if (!x.status) return this.$error(x.message);
+ this.$success("鍚敤宸烽亾鎴愬姛!");
+ this.refresh();
+ });
+ })
}
}
let disableBtn = this.buttons.find(x => x.value == 'Disable');
if (disableBtn) {
disableBtn.onClick = function () {
- this.$message.success('鑷畾涔夋寜閽偣鍑讳簨浠�');
+ let rows = this.$refs.table.getSelected();
+ if (rows.length == 0) return this.$error("璇烽�夋嫨宸烽亾!");
+ let keys = rows.map(x => {
+ return x[this.table.key];
+ });
+ if (!keys || keys.Length == 0) return this.$error("鏈幏鍙栧埌宸烽亾淇℃伅!");
+ this.$confirm("鏄惁纭瑕佺鐢ㄥ贩閬擄紵", "鎻愮ず", {
+ confirmButtonText: "纭",//纭鎸夐挳鏂囧瓧鏇存崲
+ cancelButtonText: "鍙栨秷",//鍙栨秷鎸夐挳鏂囧瓧鏇存崲
+ showClose: true,//鏄惁鏄剧ず鍙充笂瑙掑叧闂寜閽�
+ type: "warning",//鎻愮ず绫诲瀷 success:鎴愬姛/info:淇℃伅/warning:璀﹀憡/error:鎶ラ敊
+ }).then(() => {
+ this.http.post("api/RoadwayInfo/RoadwayDisableStatus", keys, "姝e湪绂佺敤宸烽亾....").then(x => {
+ if (!x.status) return this.$error(x.message);
+ this.$success("绂佺敤宸烽亾鎴愬姛!");
+ this.refresh();
+ });
+ })
}
}
},
+ enableStatus(params, Remark) {
+ let rows = this.$refs.table.getSelected();
+ if (rows.length == 0) return this.$error("璇烽�夋嫨宸烽亾!");
+ params.DelKeys = rows.map(x => {
+ return x[this.table.key];
+ });
+ if (!params.DelKeys || params.DelKeys.Length == 0) return this.$error("鏈幏鍙栧埌宸烽亾淇℃伅!");
+ this.$confirm("鏄惁纭瑕佸皢宸烽亾銆愮鐢ㄧ姸鎬併�戣缃负" + Remark + "锛�", "鎻愮ず", {
+ confirmButtonText: "纭",//纭鎸夐挳鏂囧瓧鏇存崲
+ cancelButtonText: "鍙栨秷",//鍙栨秷鎸夐挳鏂囧瓧鏇存崲
+ showClose: true,//鏄惁鏄剧ず鍙充笂瑙掑叧闂寜閽�
+ type: "warning",//鎻愮ず绫诲瀷 success:鎴愬姛/info:淇℃伅/warning:璀﹀憡/error:鎶ラ敊
+ }).then(() => {
+ this.http.post("api/RoadwayInfo/UpdateEnableStatus", params, "姝e湪璁剧疆宸烽亾....").then(x => {
+ if (!x.status) return this.$error(x.message);
+ this.$success("宸烽亾銆愮鐢ㄧ姸鎬併�戣缃负" + Remark + "鎴愬姛!");
+ this.refresh();
+ });
+ })
+ },
onInited() {
//妗嗘灦鍒濆鍖栭厤缃悗
//濡傛灉瑕侀厤缃槑缁嗚〃,鍦ㄦ鏂规硶鎿嶄綔
--
Gitblit v1.9.3