Browse Source

feat: cargo集货.增加恢复航次状态功能.

peter 1 month ago
parent
commit
30c44f0b2b
1 changed files with 20 additions and 4 deletions
  1. 20 4
      src/pages/cargo-consolidation-request/index.vue

+ 20 - 4
src/pages/cargo-consolidation-request/index.vue

@@ -198,10 +198,26 @@
               "
               size="small"
               type="danger"
-              @click="ensure"
+              @click="updateStatus('已确认')"
             >
               确认集货
             </el-button>
+            <el-button
+              v-if="
+                currentTab === 'Arrangement' &&
+                ['已确认'].includes(currentRow.Status) &&
+                [
+                  '4791186000259693001',
+                  '4791186000022965001',
+                  '4791186000052269001',
+                ].includes(currentUser)
+              "
+              size="small"
+              type="danger"
+              @click="updateStatus('可用')"
+            >
+              恢复航次
+            </el-button>
             <el-button
               class="custom-button"
               v-if="
@@ -1276,8 +1292,8 @@ const search = (keyword: string) => {
     .finally(() => (loading2.value = false))
 }
 
-const ensure = () => {
-  ElMessageBox.confirm('确定要把该记录状态更新为"已确认"吗?', {
+const updateStatus = (status = '已确认') => {
+  ElMessageBox.confirm(`确定要把该记录状态更新为"${status}"吗?`, {
     confirmButtonText: '确定',
     cancelButtonText: '取消',
     type: 'warning',
@@ -1288,7 +1304,7 @@ const ensure = () => {
       Trigger: ['workflow'],
       APIData: {
         id: currentRow.value.id,
-        Status: '已确认',
+        Status: status,
       },
     }).then((res: any) => {
       if (