From c9120bd88aa705d24d81b81cb41022dfdec02c86 Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期五, 19 一月 2024 15:40:53 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
---
north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Payment.vue | 164 +++++++++++++++++++++++++++++++++---------------------
1 files changed, 101 insertions(+), 63 deletions(-)
diff --git a/north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Payment.vue b/north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Payment.vue
index 8b12b58..475da20 100644
--- a/north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Payment.vue
+++ b/north-glass-erp/northglass-erp/src/views/mm/purchaseOrder/Payment.vue
@@ -39,14 +39,13 @@
@="gridEvents"
>
- <!-- @="gridEvents"-->
- <!-- @toolbar-button-click="toolbarButtonClickEvent"-->
+
<!-- 涓嬫媺鏄剧ず鎵�鏈変俊鎭彃妲�-->
- <template #content="{ row}">
+ <template #content="{ row }">
<ul class="expand-wrapper">
- <li v-for="(item,key,index) in row">
- <span style="font-weight: bold">{{ key + ': ' }}</span>
- <span>{{ item }}</span>
+ <li v-for="(item,index) in gridOptions.columns" v-show="item.field!==undefined ">
+ <span style="font-weight: bold">{{item.title+': '}}</span>
+ <span>{{ row[item.field] }}</span>
</li>
</ul>
</template>
@@ -79,6 +78,9 @@
import {VXETable} from "vxe-table";
import {reactive} from "vue";
import {useRouter} from 'vue-router'
+import {ElMessage, ElMessageBox} from "element-plus";
+
+const datevalue = ref('')//鏃堕棿
//缁勪欢鎺ユ敹鍙傛暟
const PayOptions = reactive({
@@ -110,10 +112,10 @@
showStatus: true
},
columns: [
- /* {title: '鎿嶄綔', width: '8%', slots: {default: 'button_slot'}, fixed: "left"},*/
- {type: 'seq', fixed: "left", title: ' ', width: '5%'},
+ /* {title: '鎿嶄綔', width: '8%', slots: {default: 'button_slot'}, fixed: "left"},*/
+ {type: 'expand', title: '', fixed: "left", slots: {content: 'content'}, width: '5%'},//璇︽儏
{type: 'checkbox', fixed: "left", title: '', width: '5%'},
- {type: 'expand', title: '璇︽儏', fixed: "left", slots: {content: 'content'}, width: '5%'},
+ {type: 'seq', fixed: "left", title: ' ', width: '5%'},
{
field: 'cgdh',
width: '10%',
@@ -147,15 +149,29 @@
slots: {filter: 'num1_filter'},
sortable: true
},
- {field: 'w', width: '10%', title: '鏈湡宸蹭粯', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
- {field: 'g', width: '10%', title: '鏈熸湯浣欓', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
+ {
+ field: 'w',
+ width: '10%',
+ title: '鏈湡宸蹭粯',
+ filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},
+ sortable: true
+ },
+ {
+ field: 'g',
+ width: '10%',
+ title: '鏈熸湯浣欓',
+ filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},
+ sortable: true
+ },
{field: 'h', width: '9%', title: '绋庣巼', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true},
{field: '6', width: '10%', title: '澶囨敞', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true}
],//琛ㄥご鍙傛暟
toolbarConfig: {
- buttons: [{type:'text'},{
+ buttons: [{type: 'text'}, {
'name': '搴斾粯纭',
- status:'primary',
+ status: 'primary',
'code': 'Sure',
}],
import: false,
@@ -165,7 +181,7 @@
custom: true,
style: 'paddling-left:10px'
},//琛ㄥご鎸夐挳
- data: [{},{},{},{}],//table body瀹為檯鏁版嵁
+ data: [{}, {}, {}, {}],//table body瀹為檯鏁版嵁
mergeFooterItems: [
{row: 0, col: 0, rowspan: 1, colspan: 3}
],//鍚堝苟鑴�
@@ -192,49 +208,13 @@
const $grid = xGrid.value
if ($grid) {
switch (code) {
- case 'Add': {//鏂板
- router.push({path: '/main/purchaseOrder/CreatePurchaseOrder'})
- break
- }
- case 'Storage': {//鍏ュ簱
+ //搴斾粯纭
+ case 'Sure': {
if ($grid.getCheckboxRecords().length === 0) {
- openAlert({type: 'message', content: '璇烽�夋嫨鑷冲皯涓�鏉℃暟鎹�', status: 'warning'})
- //VXETable.modal.message( '璇烽�夋嫨涓�鏉℃暟鎹紒')
+ MessageShow("璇烽�夋嫨鑷冲皯涓�鏉℃暟鎹�!", 'warning');
return
} else {
- const type = VXETable.modal.confirm('鎮ㄩ�夋嫨浜�' + $grid.getCheckboxRecords().length + '鏉℃暟鎹紒,鏄惁纭鍏ュ簱锛�');
- //openAlert({type:'alert', content: '鎴愬姛鍏ュ簱'+$grid.getCheckboxRecords().length+'鏉℃暟鎹紒', status: 'success' })
- //VXETable.modal.message( '璇烽�夋嫨涓�鏉℃暟鎹紒')
- return
- }
- break
- }
- case 'Return': {//閫�搴�
- if ($grid.getCheckboxRecords().length === 0) {
- openAlert({type: 'message', content: '璇烽�夋嫨鑷冲皯涓�鏉℃暟鎹�', status: 'warning'})
- //VXETable.modal.message( '璇烽�夋嫨涓�鏉℃暟鎹紒')
- return
- } else {
- /* async ()=>{
- const type = await.VXETable.modal.confirm('鎮ㄩ�夋嫨浜�'+$grid.getCheckboxRecords().length+'鏉℃暟鎹紒,鏄惁纭閫�搴擄紵');
- }*/
- const type = VXETable.modal.confirm('鎮ㄩ�夋嫨浜�' + $grid.getCheckboxRecords().length + '鏉℃暟鎹紒,鏄惁纭閫�搴擄紵');
-
-
- /* if(VXETable.modal.confirm('鎮ㄩ�夋嫨浜�'+$grid.getCheckboxRecords().length+'鏉℃暟鎹紒,鏄惁纭閫�搴擄紵' )){
- //openAlert({type:'message', content: '鎴愬姛閫�搴�'+$grid.getCheckboxRecords().length+'鏉℃暟鎹紒', status: 'success',lockView: false, mask: false })
-
-
- }*/
-
- /* if(type==='confirm'){
- openAlert({type:'message', content: '鎴愬姛閫�搴�'+$grid.getCheckboxRecords().length+'鏉℃暟鎹紒', status: 'success' })
- }
-
-*/
- //openAlert({type:'alert', content: '鎴愬姛閫�搴�'+$grid.getCheckboxRecords().length+'鏉℃暟鎹紒', status: 'success' })
- //VXETable.modal.message( '璇烽�夋嫨涓�鏉℃暟鎹紒')
- return
+ MessageConfirmShow("纭搴斾粯", '鎮ㄩ�夋嫨浜�' + $grid.getCheckboxRecords().length + '鏉℃暟鎹紒,鏄惁纭搴斾粯锛�')
}
break
}
@@ -254,16 +234,7 @@
},
}
-const openAlert = (options) => {
- if (options.type === 'message') {
- VXETable.modal.message(options)
- } else {
- VXETable.modal.alert(options)
- }
-}
-
-const datevalue = ref('')
const shortcuts = [
{
@@ -294,6 +265,73 @@
},
},
]
+
+
+//椤甸潰閫昏緫浠g爜鎵ц
+function logicExecute(type){
+ const $grid = xGrid.value
+ switch (type) {
+ case '纭搴斾粯':
+ //鍏ュ簱閫昏緫浠g爜TODO
+ MessageShow('鎿嶄綔鎴愬姛锛�', 'success');
+ break;
+
+ default:
+ MessageShow('鏈煡鎿嶄綔锛�', 'error');
+ break;
+
+ }
+ return true;
+}
+
+
+//鎻愮ず淇℃伅
+//淇℃伅鍐呭锛屾樉绀烘柟寮忥紝鏄剧ず鏍囬锛岀被鍨�
+const MessageShow = (content, type = 'success') => {
+ ElMessage({
+ message: content,
+ type: type,
+ showClose: true,
+ })
+}
+
+//鎿嶄綔纭绫讳俊鎭細鎿嶄綔绫诲瀷锛屾彁绀哄唴瀹癸紝鎻愮ず鏍囧ご锛屾彁绀虹被鍨�
+const MessageConfirmShow = (czType, content, title = '鎿嶄綔纭鎻愮ず', type = 'warning') => {
+ ElMessageBox.confirm(
+ content,
+ title,
+ {
+ cancelButtonText: '鍙栨秷',
+ confirmButtonText: '纭畾',
+ type: type,
+ center: true,
+ }
+ )
+ //鐐瑰嚮浜嗙‘瀹�
+ .then(() => {
+
+ return logicExecute(czType);
+
+ })
+ //鐐瑰嚮浜嗗彇娑�
+ .catch(() => {
+ return false;
+ })
+}
+
+//寮圭獥淇℃伅
+const MessageAlertShow = (content, title, type = 'info') => {
+
+ ElMessageBox.alert(content, title, {
+ // 绂佹鑷姩瀵圭劍
+ //autofocus: false,
+ confirmButtonText: 'OK',
+ /*callback: (action: Action) => {
+ MessageShow(`action: ${action}`,type)
+ },*/
+ })
+}
+
</script>
--
Gitblit v1.8.0