From 319e8729b47c96e3a3717c5a40cd5df867d65ce5 Mon Sep 17 00:00:00 2001 From: wanshenmean <cathay_xy@163.com> Date: 星期五, 13 九月 2024 17:25:20 +0800 Subject: [PATCH] 最新代码提交 --- Code Management/WMS/WIDESEA_WMSClient/src/extension/widesea_wms/taskinfo/Dt_Task.jsx | 89 ++++++++++++++++++++++++++------------------ 1 files changed, 53 insertions(+), 36 deletions(-) diff --git a/Code Management/WMS/WIDESEA_WMSClient/src/extension/widesea_wms/taskinfo/Dt_Task.jsx b/Code Management/WMS/WIDESEA_WMSClient/src/extension/widesea_wms/taskinfo/Dt_Task.jsx index 2fcfb9b..84dc9cc 100644 --- a/Code Management/WMS/WIDESEA_WMSClient/src/extension/widesea_wms/taskinfo/Dt_Task.jsx +++ b/Code Management/WMS/WIDESEA_WMSClient/src/extension/widesea_wms/taskinfo/Dt_Task.jsx @@ -6,49 +6,66 @@ **鍚庡彴鎿嶄綔瑙侊細http://v2.volcore.xyz/document/netCoreDev *****************************************************************************************/ //姝s鏂囦欢鏄敤鏉ヨ嚜瀹氫箟鎵╁睍涓氬姟浠g爜锛屽彲浠ユ墿灞曚竴浜涜嚜瀹氫箟椤甸潰鎴栬�呴噸鏂伴厤缃敓鎴愮殑浠g爜 -import gridHeader from "./demo_Product/Dt_TaskExecuteDetail.vue"; +import gridHeader from './demo_Product/Dt_TaskExecuteDetail.vue' let extension = { components: { //鏌ヨ鐣岄潰鎵╁睍缁勪欢 gridHeader: gridHeader, - gridBody: "", - gridFooter: "", + gridBody: '', + gridFooter: '', //鏂板缓銆佺紪杈戝脊鍑烘鎵╁睍缁勪欢 - modelHeader: "", - modelBody: "", - modelFooter: "", + modelHeader: '', + modelBody: '', + modelFooter: '' }, - tableAction: "", //鎸囧畾鏌愬紶琛ㄧ殑鏉冮檺(杩欓噷濉啓琛ㄥ悕,榛樿涓嶇敤濉啓) + tableAction: '', //鎸囧畾鏌愬紶琛ㄧ殑鏉冮檺(杩欓噷濉啓琛ㄥ悕,榛樿涓嶇敤濉啓) buttons: { view: [], box: [], detail: [] }, //鎵╁睍鐨勬寜閽� methods: { //涓嬮潰杩欎簺鏂规硶鍙互淇濈暀涔熷彲浠ュ垹闄� onInit() { //妗嗘灦鍒濆鍖栭厤缃墠锛� //绀轰緥锛氬湪鎸夐挳鐨勬渶鍓嶉潰娣诲姞涓�涓寜閽� - // this.buttons.unshift({ //涔熷彲浠ョ敤push鎴栬�卻plice鏂规硶鏉ヤ慨鏀筨uttons鏁扮粍 - // name: '鎸夐挳', //鎸夐挳鍚嶇О - // icon: 'el-icon-document', //鎸夐挳鍥炬爣vue2鐗堟湰瑙乮view鏂囨。icon锛寁ue3鐗堟湰瑙乪lement ui鏂囨。icon(娉ㄦ剰涓嶆槸element puls鏂囨。) - // type: 'primary', //鎸夐挳鏍峰紡vue2鐗堟湰瑙乮view鏂囨。button锛寁ue3鐗堟湰瑙乪lement ui鏂囨。button - // onClick: function () { - // this.$Message.success('鐐瑰嚮浜嗘寜閽�'); - // } - // }); + this.buttons.unshift({ + //涔熷彲浠ョ敤push鎴栬�卻plice鏂规硶鏉ヤ慨鏀筨uttons鏁扮粍 + name: '浠诲姟瀹屾垚', //鎸夐挳鍚嶇О + icon: 'el-icon-document', //鎸夐挳鍥炬爣vue2鐗堟湰瑙乮view鏂囨。icon锛寁ue3鐗堟湰瑙乪lement ui鏂囨。icon(娉ㄦ剰涓嶆槸element puls鏂囨。) + type: 'primary', //鎸夐挳鏍峰紡vue2鐗堟湰瑙乮view鏂囨。button锛寁ue3鐗堟湰瑙乪lement ui鏂囨。button + onClick: function () { + // this.$Message.success('鐐瑰嚮浜嗘寜閽�'); + let row = this.$refs.table.getSelected() //鑾峰彇閫変腑鐨勮 + if (row <= 0) { + //濡傛灉娌℃湁閫変腑琛� + this.$Message.error('璇烽�夋嫨涓�琛屾暟鎹�') + return + } + debugger; + let taskNum = row[0].taskNum + this.http.get(`/api/Task/CompleteTaskAsync?taskNum=${taskNum}`, {}).then((res) => { + //绀轰緥锛氳皟鐢ㄥ悗鍙版帴鍙� + if (res.data.code === 200) { + this.$Message.success('浠诲姟瀹屾垚') + } else { + this.$Message.error(res.data.msg) //閿欒鎻愮ず + } + }) + } + }) //绀轰緥锛氳缃慨鏀规柊寤恒�佺紪杈戝脊鍑烘瀛楁鏍囩鐨勯暱搴� - this.boxOptions.labelWidth = 150; + this.boxOptions.labelWidth = 150 //鏄剧ず鎻愮ず this.columns.forEach((col) => { - col.showOverflowTooltip = true; - }); + col.showOverflowTooltip = true + }) //绀轰緥锛氳嚜瀹氫箟琛ㄦ牸鍒� //琛ㄦ牸涓婃坊鍔犺嚜瀹氫箟鎸夐挳 this.columns.push({ - title: "鎿嶄綔", - field: "鎿嶄綔", + title: '鎿嶄綔', + field: '鎿嶄綔', width: 150, - align: "left", // 'center', + align: 'left', // 'center', render: (h, { row, column, index }) => { return ( <div> @@ -56,7 +73,7 @@ onClick={($e) => { // this.$refs.table.load(); // console.log(this.$refs.table); - this.$refs.gridHeader.openModel1(row); + this.$refs.gridHeader.openModel1(row) }} type="primary" plain @@ -65,13 +82,13 @@ 鏌ョ湅鎵ц淇℃伅 </el-button> </div> - ); - }, - }); + ) + } + }) }, btn1Click(row, column, index, $e) { - $e.stopPropagation(); - this.$refs.gridHeader.openModel1(row); + $e.stopPropagation() + this.$refs.gridHeader.openModel1(row) }, onInited() { //妗嗘灦鍒濆鍖栭厤缃悗 @@ -81,23 +98,23 @@ searchBefore(param) { //鐣岄潰鏌ヨ鍓�,鍙互缁檖aram.wheres娣诲姞鏌ヨ鍙傛暟 //杩斿洖false锛屽垯涓嶄細鎵ц鏌ヨ - return true; + return true }, searchAfter(result) { //鏌ヨ鍚庯紝result杩斿洖鐨勬煡璇㈡暟鎹�,鍙互鍦ㄦ樉绀哄埌琛ㄦ牸鍓嶅鐞嗚〃鏍肩殑鍊� - return true; + return true }, addBefore(formData) { //鏂板缓淇濆瓨鍓峟ormData涓哄璞★紝鍖呮嫭鏄庣粏琛紝鍙互缁欑粰琛ㄥ崟璁剧疆鍊硷紝鑷繁杈撳嚭鐪媐ormData鐨勫�� - return true; + return true }, updateBefore(formData) { //缂栬緫淇濆瓨鍓峟ormData涓哄璞★紝鍖呮嫭鏄庣粏琛ㄣ�佸垹闄よ鐨処d - return true; + return true }, rowClick({ row, column, event }) { //鏌ヨ鐣岄潰鐐瑰嚮琛屼簨浠� - this.$refs.table.$refs.table.toggleRowSelection(row); //鍗曞嚮琛屾椂閫変腑褰撳墠琛�; + this.$refs.table.$refs.table.toggleRowSelection(row) //鍗曞嚮琛屾椂閫変腑褰撳墠琛�; }, modelOpenAfter(row) { //鐐瑰嚮缂栬緫銆佹柊寤烘寜閽脊鍑烘鍚庯紝鍙互鍦ㄦ澶勫啓閫昏緫锛屽锛屼粠鍚庡彴鑾峰彇鏁版嵁 @@ -106,7 +123,7 @@ //(3)this.editFormFields.瀛楁='xxx'; //濡傛灉闇�瑕佺粰涓嬫媺妗嗚缃粯璁ゅ�硷紝璇烽亶鍘唗his.editFormOptions鎵惧埌瀛楁閰嶇疆瀵瑰簲data灞炴�х殑key鍊� //鐪嬩笉鎳傚氨鎶婅緭鍑虹湅锛歝onsole.log(this.editFormOptions) - }, - }, -}; -export default extension; + } + } +} +export default extension -- Gitblit v1.9.3