Explorar o código

设备出入库,项目计划变更

zhangjie hai 1 ano
pai
achega
1dfa6a9d3b

+ 5 - 0
src/api/sop.js

@@ -123,6 +123,11 @@ export const createPlanChange = (data) =>
     url: '/api/admin/ding/exception/apply/save',
     data,
   });
+export const planChangeDetail = (id) =>
+  request({
+    url: '/api/admin/project/exchange/view',
+    params: { id },
+  });
 // 项目变更计划审批
 export const approvePlanChange = (params) =>
   request({

+ 1 - 0
src/views/my-workbenches/workbenches/notice/index.vue

@@ -128,6 +128,7 @@ const fields = ref([
     colSpan: 10,
     attrs: {
       clearable: true,
+      valueType: 'time-stamp',
     },
   },
 

+ 1 - 0
src/views/resource-guard/device-guard/registration-query/index.vue

@@ -134,6 +134,7 @@ const fields = ref([
     colSpan: 10,
     attrs: {
       clearable: true,
+      valueType: 'time-stamp',
     },
   },
   {

+ 1 - 0
src/views/resource-guard/person-guard/person-files/index.vue

@@ -212,6 +212,7 @@ const fields = ref([
     colSpan: 10,
     attrs: {
       clearable: true,
+      valueType: 'time-stamp',
     },
   },
   {

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

@@ -160,6 +160,7 @@ const fields = ref([
     colSpan: 10,
     attrs: {
       clearable: true,
+      valueType: 'time-stamp',
     },
   },
 ]);

+ 1 - 0
src/views/service-unit/service-unit-manage/unit-manage/index.vue

@@ -179,6 +179,7 @@ const fields = ref([
     colSpan: 7,
     attrs: {
       clearable: true,
+      valueType: 'time-stamp',
     },
   },
   {

+ 5 - 1
src/views/sop/sop-manage/device-out-in/index.vue

@@ -36,7 +36,6 @@
         :columns="columns"
         :data="tableData"
         bordered
-        v-loading="tableLoading"
         :pagination="{
           defaultCurrent: 1,
           defaultPageSize: 10,
@@ -45,6 +44,7 @@
           showPageSize: false,
           total: pagination.total,
         }"
+        v-loading="tableLoading"
         :selected-row-keys="selectedRowKeys"
         @select-change="selectChange"
       >
@@ -141,6 +141,10 @@ const fields = ref([
     type: 'daterange',
     labelWidth: 100,
     colSpan: 12,
+    attrs: {
+      clearable: true,
+      valueType: 'time-stamp',
+    },
   },
   {
     prop: 'deviceNo',

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

@@ -138,12 +138,12 @@
       @confirm="fetchData"
     ></quality-issue-dialog>
     <!-- PlanChangeDialog -->
-    <PlanChangeDialog
+    <plan-change-dialog
       v-model:visible="showPlanChangeDialog"
       :sop="curSopData"
       type="new"
       @confirm="fetchData"
-    ></PlanChangeDialog>
+    ></plan-change-dialog>
     <!-- AddViolationDialog -->
     <add-violation-dialog
       v-model:visible="showAddViolationDialog"
@@ -276,6 +276,8 @@ const handleBatchCancel = () => {
   });
 };
 
+const curSopData = ref({});
+
 const showAddViolationDialog = ref(false);
 const createViolationHandle = (row) => {
   curSopData.value = row;
@@ -283,7 +285,6 @@ const createViolationHandle = (row) => {
 };
 
 const showSopStepDialog = ref(false);
-const curSopData = ref({});
 const curSopType = ref('');
 const editSopFlowHandle = (row, type = 'fill') => {
   curSopType.value = type;

+ 55 - 26
src/views/sop/sop-manage/plan-change/index.vue

@@ -4,47 +4,55 @@
       <t-collapse-panel disabled>
         <template #expandIcon></template>
         <template #header>
-          项目派单信息(SOP流水单号:{{ sop.sopNo }})
+          项目派单信息(SOP流水单号:{{ sopInfo.sopNo }})
         </template>
         <t-form colon label-width="72px">
           <t-row :gutter="[0, 4]">
             <t-col :span="3">
-              <t-form-item label="项目单号">{{ sop.crmNo }}</t-form-item>
+              <t-form-item label="项目单号">{{ sopInfo.crmNo }}</t-form-item>
             </t-col>
             <t-col :span="3">
-              <t-form-item label="项目名称">{{ sop.crmName }}</t-form-item>
+              <t-form-item label="项目名称">{{ sopInfo.crmName }}</t-form-item>
             </t-col>
             <t-col :span="3">
-              <t-form-item label="派单时间">{{ sop.beginTime }}</t-form-item>
+              <t-form-item label="派单时间">{{
+                sopInfo.beginTime
+              }}</t-form-item>
             </t-col>
             <t-col :span="3">
               <t-form-item label="客户经理">{{
-                sop.customManagerName
+                sopInfo.customManagerName
               }}</t-form-item>
             </t-col>
             <t-col :span="3">
               <t-form-item label="客户类型">{{
-                sop.customManagerTypeStr
+                sopInfo.customManagerTypeStr
               }}</t-form-item>
             </t-col>
             <t-col :span="3">
-              <t-form-item label="客户名称">{{ sop.customName }}</t-form-item>
+              <t-form-item label="客户名称">{{
+                sopInfo.customName
+              }}</t-form-item>
             </t-col>
             <t-col :span="3">
               <t-form-item label="考试开始时间" label-width="100px">{{
-                sop.examStartTime
+                sopInfo.examStartTime
               }}</t-form-item>
             </t-col>
             <t-col :span="3">
               <t-form-item label="考试结束时间" label-width="100px">{{
-                sop.examEndTime
+                sopInfo.examEndTime
               }}</t-form-item>
             </t-col>
             <t-col :span="3">
-              <t-form-item label="实施产品">{{ sop.productName }}</t-form-item>
+              <t-form-item label="实施产品">{{
+                sopInfo.productName
+              }}</t-form-item>
             </t-col>
             <t-col :span="3">
-              <t-form-item label="服务单元">{{ sop.serviceName }}</t-form-item>
+              <t-form-item label="服务单元">{{
+                sopInfo.serviceName
+              }}</t-form-item>
             </t-col>
           </t-row>
         </t-form>
@@ -55,7 +63,7 @@
         <template #expandIcon></template>
         <template #header> SOP项目计划变更说明 </template>
         <p class="red">
-          SOP项目计划需要变更时,可手动发起一个或多个申请,质控专员审核后,在SOP流程中进行计划变更调整,完成变更后,申请流程结束并通知到发起申请人
+          SOP项目计划需要变更时,可手动发起一个或多个申请,质控专员审核后,在SOP流程中进行计划变更调整,完成变更后,申请流程结束并通知到发起申请人
         </p>
       </t-collapse-panel>
     </t-collapse>
@@ -72,16 +80,20 @@
         <t-row :gutter="[0, 20]">
           <template v-if="!IS_NEW_MODE">
             <t-col :span="4">
-              <t-form-item label="报备申请人"> 1111 </t-form-item>
+              <t-form-item label="报备申请人">
+                {{ sopInfo.createRealName }}
+              </t-form-item>
             </t-col>
-            <t-col :span="4">
-              <t-form-item label="报备申请时间"> 1111 </t-form-item>
+            <t-col :span="4" :offset="1">
+              <t-form-item label="报备申请时间">
+                {{ timestampFilter(sopInfo.createTime) }}
+              </t-form-item>
             </t-col>
           </template>
           <t-col :span="12">
             <t-form-item label="变更类型" requiredMark>
               <div style="padding-top: 3px">
-                <t-radio-group v-model="formData.type">
+                <t-radio-group v-model="formData.type" :disabled="readonly">
                   <t-radio
                     :value="item.value"
                     :key="item.value"
@@ -124,7 +136,7 @@
           </t-col>
           <template v-if="!IS_NEW_MODE">
             <t-col :span="12">
-              <div class="form-group-title next"> 变更处理结果 </div>
+              <div class="form-group-title"> 变更处理结果 </div>
             </t-col>
             <t-col :span="12">
               <t-form-item label="处理结果">
@@ -157,15 +169,16 @@
 <script setup name="PlanChange">
 import { ref, computed, reactive } from 'vue';
 import { MessagePlugin } from 'tdesign-vue-next';
-import { useRoute } from 'vue-router';
 import dynamicTable from '@/components/common/dynamic-table';
 import { dictToOptionList } from '@/utils/tool';
 import { PLAN_CHANGE_TYPE } from '@/config/constants';
-import { createPlanChange, approvePlanChange } from '@/api/sop';
+import {
+  createPlanChange,
+  approvePlanChange,
+  planChangeDetail,
+} from '@/api/sop';
 import { omit } from 'lodash';
-
-const dTable = ref();
-const route = useRoute();
+import { timestampFilter } from '@/utils/filter';
 
 const props = defineProps({
   sop: {
@@ -181,6 +194,8 @@ const props = defineProps({
 });
 const emit = defineEmits(['confirm', 'cancel']);
 
+const sopInfo = ref({ ...props.sop });
+
 const IS_NEW_MODE = computed(() => {
   return props.type === 'new';
 });
@@ -231,6 +246,7 @@ const columns = computed(() => [
     },
   },
 ]);
+
 const formRef = ref(null);
 const formData = reactive({
   serviceId: '',
@@ -244,13 +260,26 @@ const formData = reactive({
   remark: '',
 });
 
-const initData = () => {
-  if (IS_NEW_MODE) {
+const initData = async () => {
+  if (IS_NEW_MODE.value) {
     formData.serviceId = props.sop.serviceId;
     formData.sopNo = props.sop.sopNo;
     formData.crmNo = props.sop.crmNo;
     formData.flowDeploymentId = props.sop.flowDeploymentId;
+    return;
   }
+
+  // audit
+  const res = await planChangeDetail(props.sop.id);
+  sopInfo.value.beginTime = res.crmInfo.crmBeginTime;
+  sopInfo.value.customManagerName = res.crmInfo.customManagerName;
+  sopInfo.value.customManagerTypeStr = props.sop.customTypeStr;
+  sopInfo.value.examStartTime = '';
+  sopInfo.value.examEndTime = '';
+  sopInfo.value.productName = res.crmInfo.productName;
+
+  formData = objAssign(formData, res.tbProjectExchange);
+  formData.contentJson = JSON.parse(formData.contentJson);
 };
 initData();
 
@@ -310,12 +339,12 @@ const submitHandle = async () => {
       flowApprove: 'PASS',
       projectExchangeApprove: formData.projectExchangeApprove,
       remark: formData.remark,
-      taskId: route.query.taskId,
+      taskId: props.sop.taskId,
     }).catch(() => {});
     if (!res) return;
   }
 
-  MessagePlugin.success('保存成功');
+  MessagePlugin.success('提交成功');
   emit('confirm');
 };
 

+ 32 - 13
src/views/sop/sop-manage/project-change-report/index.vue

@@ -27,6 +27,7 @@
           showPageSize: false,
           total: pagination.total,
         }"
+        v-loading="tableLoading"
         :selected-row-keys="selectedRowKeys"
         @select-change="selectChange"
       >
@@ -39,6 +40,14 @@
         </template>
       </t-table>
     </div>
+
+    <!-- PlanChangeDialog -->
+    <plan-change-dialog
+      v-model:visible="showPlanChangeDialog"
+      :sop="curSopData"
+      type="audit"
+      @confirm="fetchData"
+    ></plan-change-dialog>
   </div>
 </template>
 
@@ -49,6 +58,8 @@ import { dictToOptionList } from '@/utils/tool';
 import { omit } from 'lodash';
 import { useRouter } from 'vue-router';
 import { planChangeList } from '@/api/sop';
+import PlanChangeDialog from '../plan-change/plan-change-dialog.vue';
+
 import {
   PLAN_CHANGE_TYPE,
   CUSTOMER_TYPE,
@@ -57,23 +68,24 @@ import {
 
 const router = useRouter();
 const selectedRowKeys = ref([]);
-const selectChange = (value, { selectedRowData }) => {
+const selectChange = (value) => {
   selectedRowKeys.value = value;
 };
+
 const columns = [
   { colKey: 'code', title: '变更申请编号', width: 200 },
   { colKey: 'serviceName', title: '服务单元', width: 140 },
   { colKey: 'customTypeStr', title: '客户类型', width: 120 },
   { colKey: 'customName', title: '客户名称', width: 140 },
-  { colKey: 'crmNo', title: '项目单号' },
-  { colKey: 'crmName', title: '项目名称' },
-  { colKey: 'reason', title: '变更原因' },
-  { colKey: 'exchangeTypeStr', title: '变更类型' },
-  { colKey: 'createRealName', title: '提交人' },
-  { colKey: 'createTime', title: '提交时间', width: 140 },
-  { colKey: 'projectExchangeFlowStatusStr', title: '流程状态' },
-  { colKey: 'approveUsersName', title: '处理人' },
-  { colKey: 'flowTime', title: '处理时间' },
+  { colKey: 'crmNo', title: '项目单号', width: 200 },
+  { colKey: 'crmName', title: '项目名称', width: 140 },
+  { colKey: 'reason', title: '变更原因', minWidth: 140 },
+  { colKey: 'exchangeTypeStr', title: '变更类型', width: 120 },
+  { colKey: 'createRealName', title: '提交人', width: 140 },
+  { colKey: 'createTime', title: '提交时间', width: 180 },
+  { colKey: 'projectExchangeFlowStatusStr', title: '流程状态', width: 120 },
+  { colKey: 'approveUsersName', title: '处理人', width: 140 },
+  { colKey: 'flowTime', title: '处理时间', width: 180 },
   {
     title: '管理',
     colKey: 'operate',
@@ -81,8 +93,12 @@ const columns = [
     width: 120,
   },
 ];
+const curSopData = ref({});
+const showPlanChangeDialog = ref(false);
+
 const handleApply = (row) => {
-  router.push({ name: 'PlanChange', query: { taskId: row.taskId } });
+  curSopData.value = row;
+  showPlanChangeDialog.value = true;
 };
 const fields = ref([
   {
@@ -156,6 +172,10 @@ const fields = ref([
     type: 'daterange',
     labelWidth: 100,
     colSpan: 9,
+    attrs: {
+      clearable: true,
+      valueType: 'time-stamp',
+    },
   },
 ]);
 const params = reactive({
@@ -181,8 +201,7 @@ const {
   pagination,
   tableData,
   search,
+  fetchData,
   onChange,
 } = useFetchTable(planChangeList, { params: transParams });
 </script>
-
-<style></style>

+ 4 - 0
src/views/sop/sop-monitor/delay-warning/index.vue

@@ -217,6 +217,10 @@ const fields = ref([
     type: 'daterange',
     labelWidth: 80,
     colSpan: 10,
+    attrs: {
+      clearable: true,
+      valueType: 'time-stamp',
+    },
   },
   {
     prop: 'fieldObj',

+ 4 - 0
src/views/sop/sop-monitor/violation-registration/index.vue

@@ -239,6 +239,10 @@ const fields = ref([
     type: 'daterange',
     labelWidth: 100,
     colSpan: 9,
+    attrs: {
+      clearable: true,
+      valueType: 'time-stamp',
+    },
   },
 ]);
 const params = reactive({

+ 1 - 0
src/views/system/notice-log/log-manage/index.vue

@@ -43,6 +43,7 @@ const fields = ref([
     colSpan: 7,
     attrs: {
       clearable: true,
+      valueType: 'time-stamp',
     },
   },
   {

+ 1 - 0
src/views/system/notice-log/notice-manage/index.vue

@@ -155,6 +155,7 @@ const fields = ref([
     colSpan: 7,
     attrs: {
       clearable: true,
+      valueType: 'time-stamp',
     },
   },
   {

+ 2 - 0
src/views/work-hours/work-hours-manage/abnormal-check/done-check.vue

@@ -113,6 +113,7 @@ const fields = ref([
     colSpan: 10,
     attrs: {
       clearable: true,
+      valueType: 'time-stamp',
     },
   },
   {
@@ -123,6 +124,7 @@ const fields = ref([
     colSpan: 10,
     attrs: {
       clearable: true,
+      valueType: 'time-stamp',
     },
   },
   {

+ 2 - 0
src/views/work-hours/work-hours-manage/abnormal-check/wait-check.vue

@@ -146,6 +146,7 @@ const fields = ref([
     colSpan: 10,
     attrs: {
       clearable: true,
+      valueType: 'time-stamp',
     },
   },
   {
@@ -156,6 +157,7 @@ const fields = ref([
     colSpan: 10,
     attrs: {
       clearable: true,
+      valueType: 'time-stamp',
     },
   },
 ]);

+ 1 - 0
src/views/work-hours/work-hours-manage/work-attendance-detail/index.vue

@@ -92,6 +92,7 @@ const fields = ref([
     colSpan: 10,
     attrs: {
       clearable: true,
+      valueType: 'time-stamp',
     },
   },
   {