From 59ef6e9b5b8aff7614711c2afdba23a460ac1c56 Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期三, 27 三月 2024 08:41:47 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
---
north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue | 35 ++++++++++++++++++++++++++++++++---
1 files changed, 32 insertions(+), 3 deletions(-)
diff --git a/north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue b/north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue
index 9f25879..390d88a 100644
--- a/north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue
+++ b/north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue
@@ -8,7 +8,8 @@
import useUserInfoStore from '@/stores/userInfo'
import SelectProduct from "@/views/sd/product/SelectProduct.vue"
import {changeFilterEvent,filterChanged} from "@/hook"
-import {addListener,toolbarButtonClickEvent} from "@/hook/mouseMove";
+import {addListener,toolbarButtonClickEvent} from "@/hook/mouseMove"
+import downLoadFile from "@/hook/downLoadFile"
import {useI18n} from "vue-i18n"
const { t } = useI18n()
@@ -299,7 +300,7 @@
}
}
}
- },//澶撮儴鎸夐挳浜嬩欢
+ },//鍙抽敭鎸夐挳浜嬩欢
menuClick ({ menu, row, column }) {
const $grid = xGrid.value
if ($grid) {
@@ -411,18 +412,35 @@
onMounted(()=>{
//鍚敤琛ㄦ牸鎷栧姩閫変腑
addListener(xGrid.value,gridOptions)
- const str = route.query.orderId
+ const str = route.query.orderId || history.state.orderId
if (typeof str === 'undefined' || str === null || str === '' || str === '\n' || str === '\r'){
return
}
request.post(`/order/getOrderById/${str}`).then((res) => {
if(res.code==200){
titleUploadData.value = res.data.order
+ if(history.state.orderId!=null){
+ titleUploadData.value.orderId=''
+ titleUploadData.value.id=null
+ titleUploadData.value.processReview=null
+ titleUploadData.value.orderReview=null
+ titleUploadData.value.productionOrder=null
+ titleUploadData.value.processingCard=null
+ titleUploadData.value.warehousing=null
+ titleUploadData.value.delivery=null
+ titleUploadData.value.createTime=null
+
+ if(history.state.type=='copy'){
+ xGrid.value.reloadData(res.data.orderDetails)
+ }
+ return
+ }
//鍙栨秷宸ヨ壓鎸夐挳绂佺敤
gridOptions.toolbarConfig.buttons[1].disabled = false
//宸ヨ壓瀹℃牳鍚庝繚瀛樻寜閽鐢�
if(res.data.order.processReview === 2){
gridOptions.toolbarConfig.buttons[4].disabled = true
+
}
//鍙栨秷瀹℃牳鎸夐挳绂佺敤
if(res.data.order.processReview === 2 && res.data.order.orderReview === 0){
@@ -439,6 +457,11 @@
status: 'primary',
'name': (res.data.order.orderReview>0?t('basicData.cancel'):t('basicData.restore'))}
gridOptions.toolbarConfig.buttons.push(button)
+ if(res.data.order.orderReview===-2){
+ gridOptions.toolbarConfig.buttons[2].disabled = true
+ gridOptions.toolbarConfig.buttons[3].disabled = true
+ gridOptions.toolbarConfig.buttons[4].disabled = true
+ }
}
if(res.data.order.productionOrder !==0 ){
gridOptions.toolbarConfig.buttons[2].disabled = true
@@ -595,6 +618,11 @@
xGrid.value.loadData(jsonData)
}
fileReader.readAsBinaryString(files[0])
+}
+
+//妯℃澘涓嬭浇
+const importTemplate = () => {
+ downLoadFile('/importTemplate.xlsx','importTemplate.xlsx')
}
//琛屽崟鍏冩牸淇敼淇敼瑙﹀彂姝や簨浠�
@@ -764,6 +792,7 @@
</div>
</template>
<template #toolbar_buttons>
+ <vxe-button @click="importTemplate">{{$t('order.template')}}</vxe-button>
<vxe-button @click="importEvent">{{$t('order.import')}}</vxe-button>
</template>
--
Gitblit v1.8.0