浏览代码

派单管理页面小修改

刘洋 1 年之前
父节点
当前提交
68bd011f9a

+ 2 - 1
src/api/service-unit.js

@@ -41,9 +41,10 @@ export const dispatchBatchZoneApi = (data) =>
     url: '/api/admin/tb/crm/batchZone',
     params: data,
   });
-export const dispatchCountWaitZoneApi = () =>
+export const dispatchCountWaitZoneApi = (data) =>
   request({
     url: '/api/admin/tb/crm/countWaitZone',
+    params: data,
     // method: 'get',
   });
 

+ 21 - 1
src/components/common/select-service-unit/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <t-select
+  <!-- <t-select
     v-model="selected"
     filterable
     clearable
@@ -12,6 +12,25 @@
       :value="item.id"
       :label="item.name"
     />
+  </t-select> -->
+  <t-select
+    v-model="selected"
+    filterable
+    clearable
+    v-bind="attrs"
+    @change="onChange"
+  >
+    <t-option v-if="hasNoneValue" value="-1" label="未绑定服务单元">
+      <span class="red">未绑定服务单元</span>
+    </t-option>
+    <t-option
+      v-for="item in optionList"
+      :key="item.id"
+      :value="item.id"
+      :label="item.name"
+    >
+      {{ item.name }}
+    </t-option>
   </t-select>
 </template>
 
@@ -35,6 +54,7 @@ const props = defineProps({
       return { statusList: ['PUBLISH'] };
     },
   },
+  hasNoneValue: { type: Boolean, default: false },
 });
 
 const isMultiple = computed(() => {

+ 5 - 1
src/views/resource-guard/device-guard/device-send/index.vue

@@ -136,7 +136,11 @@
             <t-link
               theme="primary"
               hover="color"
-              v-if="row.status == 'DELIVER' && !row.crmNo && perm.LINK_Receive"
+              v-if="
+                row.status == 'DELIVER' &&
+                !(row.crmNo && row.deliveryType === 'OUT') &&
+                perm.LINK_Receive
+              "
               @click="handleOperate('RECEIVE', [row.id])"
             >
               签收

+ 13 - 2
src/views/service-unit/dispatch/dispatch-manage/index.vue

@@ -27,7 +27,10 @@
     </div>
     <SearchForm :fields="fields" :params="params" :search="refresh">
       <template #service="{ item, params }">
-        <select-service-unit v-model="params[item.prop]"></select-service-unit>
+        <select-service-unit
+          v-model="params[item.prop]"
+          :hasNoneValue="true"
+        ></select-service-unit>
       </template>
       <template #lead="{ item, params }">
         <select-type-user
@@ -318,6 +321,11 @@ const computedParams = computed(() => {
   let data = omit(params, ['beginTime']);
   data.startTime = params.beginTime[0];
   data.endTime = params.beginTime[1];
+  data.isBind = true;
+  if (data.serviceId == '-1') {
+    data.isBind = false;
+    data.serviceId = '';
+  }
   return data;
 });
 
@@ -381,7 +389,10 @@ const refresh = () => {
 };
 
 const getWaitCount = async () => {
-  const res = await dispatchCountWaitZoneApi();
+  const res = await dispatchCountWaitZoneApi({
+    ...computedParams.value,
+    isBind: false,
+  });
   waitCount.value = res || 0;
 };