刘洋 1 سال پیش
والد
کامیت
8bc1680100

+ 1 - 1
src/api/sop.js

@@ -185,7 +185,7 @@ export const sopCancelApi = (flowId) =>
 export const sopBatchCancelApi = (flowIds) =>
   request({
     url: '/api/admin/sop/batch/cancel',
-    data: { flowIds },
+    data: flowIds,
   });
 // sop 编辑-详情
 export const sopEditApi = (sopId) =>

+ 1 - 0
src/views/service-unit/service-unit-manage/range-manage/add-range-dialog.vue

@@ -44,6 +44,7 @@
             onChange,
             showJumper: true,
             showPageSize: false,
+            total: pagination.total,
             current: pagination.pageNumber,
           }"
           v-loading="tableLoading"

+ 7 - 2
src/views/sop/components/dynamic-form-item/device-table/edit-column-dialog.vue

@@ -39,7 +39,7 @@
           style="width: 120px"
         ></t-input-number>
       </t-form-item>
-      <t-form-item
+      <!-- <t-form-item
         v-if="isOutType"
         label="发往地"
         name="addressArr"
@@ -49,6 +49,9 @@
           v-model="formData.addressArr"
           value-type="full"
         ></select-area>
+      </t-form-item> -->
+      <t-form-item label="发往地">
+        <t-input v-model="formData.address"></t-input>
       </t-form-item>
       <t-form-item label="快递单拍照" name="basePhotoPath">
         <my-upload
@@ -172,6 +175,8 @@ const deviceChange = (val, { option }) => {
   formData.location = option.location;
   if (!props.isOutType) {
     formData.address = option.supplierName;
+  } else {
+    formData.address = option.customName;
   }
 };
 
@@ -190,7 +195,7 @@ const save = async () => {
   for (let key in formData) {
     data[key] = formData[key];
   }
-  if (props.isOutType) data.address = data.addressArr.join('');
+  // if (props.isOutType) data.address = data.addressArr.join('');
   emit('update:visible', false);
   emit('success', data);
 };

+ 17 - 3
src/views/sop/components/select-filter/index.vue

@@ -11,7 +11,21 @@
     <template #content>
       <div class="filter-box">
         <div class="filter-header">
-          <p>筛选出符合以下所有内容</p>
+          <p
+            >筛选出符合以下<t-select
+              size="small"
+              v-model="formWidgetMetadataOperation"
+              style="
+                width: 80px;
+                display: inline-block;
+                margin-left: 5px;
+                margin-right: 5px;
+              "
+            >
+              <t-option value="AND" label="全部"></t-option>
+              <t-option value="OR" label="任一"></t-option> </t-select
+            >内容</p
+          >
         </div>
         <div class="filter-body">
           <t-button theme="primary" size="small" @click="addHandle">
@@ -103,7 +117,7 @@ const props = defineProps({
     },
   },
 });
-
+const formWidgetMetadataOperation = ref('AND');
 const visible = ref(false);
 const toggleVisible = () => {
   visible.value = !visible.value;
@@ -166,7 +180,7 @@ const confirmHandle = () => {
     MessagePlugin.error('有字段未完成设置!');
     return;
   }
-  emit('confirm', dataList.value);
+  emit('confirm', dataList.value, formWidgetMetadataOperation.value);
   toggleVisible();
 };
 </script>

+ 9 - 8
src/views/sop/components/sop-sort-panel/index.vue

@@ -90,14 +90,15 @@ const fieldIdChange = (fieldId) => {
   }
 };
 const confirmHandle = () => {
-  let data = sortMethod.value
-    ? [
-        {
-          fieldId: fieldId.value,
-          order: sortMethod.value,
-        },
-      ]
-    : [];
+  let data =
+    sortMethod.value && fieldId.value
+      ? [
+          {
+            fieldId: fieldId.value,
+            order: sortMethod.value,
+          },
+        ]
+      : [];
   emit('confirm', data);
   toggleVisible();
 };

+ 3 - 1
src/views/sop/sop-manage/office-sop/index.vue

@@ -310,6 +310,7 @@ const params = reactive({
   formWidgetMetadataViewList: [],
   formWidgetMetadataConditionList: [],
   formWidgetMetadataOrderList: [],
+  formWidgetMetadataOperation: 'AND',
 });
 const transParams = computed(() => {
   return { ...params, type: 'OFFICE_SOP_FLOW' };
@@ -328,7 +329,7 @@ const metadataChange = (vals) => {
   formWidgetMetadataViewList.value = vals;
 };
 
-const filterConfirm = (data) => {
+const filterConfirm = (data, formWidgetMetadataOperation) => {
   params.formWidgetMetadataConditionList = data.map((item) => {
     return {
       fieldId: item.fieldId,
@@ -336,6 +337,7 @@ const filterConfirm = (data) => {
       fieldValue: item.fieldValue,
     };
   });
+  params.formWidgetMetadataOperation = formWidgetMetadataOperation;
 };
 const sortConfirm = (data) => {
   params.formWidgetMetadataOrderList = data;

+ 14 - 4
src/views/sop/sop-manage/student-sop/index.vue

@@ -19,10 +19,14 @@
         <template #icon><svg-icon name="refresh" color="#262626" /></template>
         刷新</t-button
       >
-      <t-button variant="outline" @click="handleSort">
+      <!-- <t-button variant="outline" @click="handleSort">
         <template #icon><svg-icon name="sort" color="#262626" /></template>
         排序</t-button
-      >
+      > -->
+      <sop-sort-panel
+        :metadata="formWidgetMetadataViewList"
+        @confirm="sortConfirm"
+      ></sop-sort-panel>
       <t-button
         v-if="appStore.showSubmenu"
         variant="outline"
@@ -222,6 +226,7 @@ import AddViolationDialog from '../../sop-monitor/violation-registration/add-vio
 import MetadataContent from '../../components/metadata-content.vue';
 import { useAppStore } from '@/store';
 import usePermission from '@/hooks/usePermission';
+import SopSortPanel from '../../components/sop-sort-panel/index.vue';
 const { perm } = usePermission();
 
 const appStore = useAppStore();
@@ -302,6 +307,8 @@ const params = reactive({
   serviceId: '',
   formWidgetMetadataViewList: [],
   formWidgetMetadataConditionList: [],
+  formWidgetMetadataOrderList: [],
+  formWidgetMetadataOperation: 'AND',
 });
 const transParams = computed(() => {
   return { ...params, type: 'CLOUD_MARK_SOP_FLOW' };
@@ -320,7 +327,7 @@ const metadataChange = (vals) => {
   formWidgetMetadataViewList.value = vals;
 };
 
-const filterConfirm = (data) => {
+const filterConfirm = (data, formWidgetMetadataOperation) => {
   params.formWidgetMetadataConditionList = data.map((item) => {
     return {
       fieldId: item.fieldId,
@@ -328,8 +335,11 @@ const filterConfirm = (data) => {
       fieldValue: item.fieldValue,
     };
   });
+  params.formWidgetMetadataOperation = formWidgetMetadataOperation;
+};
+const sortConfirm = (data) => {
+  params.formWidgetMetadataOrderList = data;
 };
-
 const handleSort = () => {
   // TODO:
 };

+ 13 - 1
src/views/system/config-manage/service-level-manage/edit-service-level-dialog.vue

@@ -87,7 +87,7 @@
           </t-form-item>
         </t-col>
         <t-col :span="6">
-          <t-form-item label="设备配额">
+          <t-form-item label="设备配额" name="devices">
             <t-input-number
               v-model="formData.devices"
               theme="column"
@@ -191,6 +191,18 @@ const rules = {
       trigger: 'change',
     },
   ],
+  devices: [
+    {
+      validator: (val) => {
+        if (Number(val) <= 0) {
+          return { result: false, message: '设备配额必须大于0' };
+        }
+        return { result: true, type: 'success' };
+      },
+      type: 'error',
+      trigger: 'change',
+    },
+  ],
 };
 
 const roleColumns = [