yuansh 1 mese fa
parent
commit
e026c17e13

+ 13 - 1
src/views/afterCode/AfterServiceLogs/AfterServiceLogs.data.ts

@@ -98,7 +98,7 @@ export const afterServiceLogsDetailsColumns: JVxeColumn[] = [
       fixed: 'left',
     },
     {
-      title: '备注(notes)',
+      title: '补充说明(notes)',
       key: 'notes',
       type: JVxeTypes.input,
       width:"200px",
@@ -512,6 +512,18 @@ export const afterServiceLogsDetailsColumns: JVxeColumn[] = [
       width:"200px",
       placeholder: '请输入${title}',
       defaultValue:'',
+    },{
+      title: '操作(operation)',
+      key: 'action',
+      width:"150px",
+      // 固定在右侧
+      fixed: 'right',
+      // 对齐方式为居中
+      align: 'center',
+      // 组件类型定义为【插槽】
+      type: JVxeTypes.slot,
+      // slot 的名称,对应 v-slot 冒号后面和等号前面的内容
+      slotName: 'action',
     },
   ]
 

+ 22 - 1
src/views/afterCode/AfterServiceLogs/AfterServiceLogsList.vue

@@ -118,6 +118,7 @@
     </BasicTable>
     <!-- 表单区域 -->
     <AfterServiceLogsModal @register="registerModal" @success="handleSuccess"></AfterServiceLogsModal>
+    <AfterPrintModal @register="registerPrintModal" @success="handleSuccess"></AfterPrintModal>
   </div>
 </template>
 
@@ -127,6 +128,7 @@
   import { useListPage } from '/@/hooks/system/useListPage'
   import {useModal} from '/@/components/Modal';
   import AfterServiceLogsModal from './components/AfterServiceLogsModal.vue'
+  import AfterPrintModal from './components/AfterPrintModal.vue'
   import {columns, superQuerySchema} from './AfterServiceLogs.data';
   import {list, deleteOne, batchDelete, getImportUrl,getExportUrl,
     submitBatch,
@@ -141,6 +143,9 @@
   const checkedKeys = ref<Array<string | number>>([]);
   //注册model
   const [registerModal, {openModal}] = useModal();
+  
+  const [registerPrintModal, {openModal: openPrintModal }] = useModal();
+  
   const userStore = useUserStore();
    //注册table数据
   const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({
@@ -151,7 +156,7 @@
            canResize:false,
            useSearchForm: false,
            actionColumn: {
-               width: 120,
+               width: 220,
                fixed:'right'
            },
            beforeFetch: async (params) => {
@@ -185,6 +190,16 @@
     reload();
   }
 
+   /**
+    * 打印事件
+    */
+  function printClick(record: Recordable) {
+     openPrintModal(true, {
+       record,
+       isUpdate: true,
+       showFooter: false,
+     });
+  }
    /**
     * 新增事件
     */
@@ -258,7 +273,12 @@
   function getTableAction(record){
        return [
          {
+           label: '打印',
+           onClick: printClick.bind(null, record),
+         }
+		 ,{
            label: '编辑',
+			ifShow: record.submit == '0',
            onClick: handleEdit.bind(null, record),
            auth: 'afterCode:after_service_logs:edit'
          }
@@ -274,6 +294,7 @@
            onClick: handleDetail.bind(null, record),
          }, {
            label: '删除',
+			ifShow: record.submit == '0',
            popConfirm: {
              title: '是否确认删除',
              confirm: handleDelete.bind(null, record),

+ 205 - 0
src/views/afterCode/AfterServiceLogs/components/AfterPrint.vue

@@ -0,0 +1,205 @@
+<template>
+	<a-button type="primary" style="float:right" ghost @click="onPrint">打印</a-button>
+   <table class="a4-table" id="printContent">
+          <!-- 标题行 -->
+          <tr>
+              <td colspan="3" style="height:20px;border:none; padding:0">
+                  <table width="100%" style="border:none">
+                      <tr style="height:20%	;" >
+                          <td style="text-align:center;width:20%;border:none">
+                               <img style="height:20mm;width:30mm;margin-top: 12%;"src="/resource/img/logo1.png" alt="公司logo">
+                          </td>
+                          <td style="text-align:center;border:none">
+                              <div class="company-name">上海哥宝海事工程有限公司</div>
+                              <div class="form-title">外勤工作总结表</div>
+                          </td>
+                          <td style="width:20%;border:none">
+                          </td>
+                      </tr>
+                      <tr>
+                          <td style="width:40mm;border:none; " class="doc-info" colspan="3" >
+                              表单编号:{{dateRef.billCode}}
+                              版本:A/1
+                          </td>
+                      </tr>
+                  </table>
+              </td>
+          </tr>
+          <!-- 个人信息 -->
+          <tr>
+              <td class="header-cell">姓 名</td>
+              <td  class="header-cell">部 门</td>
+              <td class="header-cell">本次外勤工作地点</td>
+          </tr>
+          <tr>
+              <td class="full-height">{{dateRef.schedulingMan}}</td>
+              <td  class="full-height">{{dateRef.sysOrgCode_dictText}}</td>
+              <td class="full-height">{{dateRef.address}}</td>
+          </tr>
+  
+          <!-- 工作天数 -->
+          <tr>
+              <td class="header-cell">外勤工作计划天数</td>
+              <td  class="header-cell">实际工作天数</td>
+              <td class="header-cell">工作天数差异原因</td>
+          </tr>
+          <tr>
+              <td class="full-height">{{dateRef.daysDifference}}</td>
+              <td  class="full-height"></td>
+              <td class="full-height"></td>
+          </tr>
+  
+          <!-- 订单编号 -->
+          <tr>
+              <td class="header-cell" style="text-align: left;white-space: nowrap;">此次外勤工作成交订单编号:</td>
+              <td colspan="2" class="header-cell"></td>
+          </tr>
+  
+          <!-- 工作总结 -->
+          <tr>
+              <td colspan="3" style="vertical-align: top; text-align: left;" class="large-height">外勤工作总结:{{dateRef.maintenanceLog}}</td>
+          </tr>
+  
+          
+         <tr>
+			  <td colspan="3" style="height:30px; padding:0">
+				<table style="border:none" width="100%" >
+					<!-- 经理意见 -->
+					<tr>
+						<td style="border-top: none; border-left: none;width:50%;height:25mm">部门经理外勤时间确认:</td>
+						<td style="border-top: none; border-right: none;width:50%;height:25mm">部门经理意见:</td>
+					</tr>	
+						
+					<!-- 财务/总经理意见 -->
+					<tr>
+						<td style="border-bottom: none; border-left: none;width:50%;height:25mm">财务部意见:</td>
+						<td style="border-bottom: none; border-right: none;width:50%;height:25mm">总经理意见:</td>
+					</tr>
+				</table>
+			  </td>
+         </tr>
+          
+  
+		   <tr>
+              <td colspan="3" style="text-align: center;border:none;padding-top:20px">Page 1 of 1</td>
+          </tr>
+      </table>
+</template>
+
+
+<script lang="ts">
+  import { ref, reactive } from 'vue';
+  import { PageWrapper } from '/@/components/Page';
+  import { printJS } from '/@/hooks/web/usePrintJS';
+  import { Form, message } from 'ant-design-vue';
+  const useForm = Form.useForm;
+  export default {
+    name: 'AfterPrint',
+    components: {  },
+    props: {
+      reBizCode: {
+        type: String,
+        default: '',
+      },
+	  formRef:{}
+    },
+    setup() {
+	 
+	 var dateRef = reactive<Record<string, any>>({
+        id: '',
+        billCode: '',
+        billDate: '',
+        projectManager: '',   
+        project: '',   
+        projectName: '',   
+        otherProject: '',   
+        customer: '',   
+        customerName: '',   
+        address: '',   
+        travelMode: '',   
+        schedulingDateBegin: '',   
+        schedulingDateEnd: '',   
+        schedulingMan: '',   
+        maintenanceLog: '',   
+        attsch: '',   
+        sysOrgCode: '',   
+        sysOrgCode_dictText: '',   
+        daysDifference: '',   
+      });
+      function onPrint(row) {
+		  
+		  const tmpData = {};
+		  Object.keys(dateRef).forEach((key) => {
+		    if (row.hasOwnProperty(key)) {
+		      tmpData[key] = row[key];
+		    }
+		  });
+		  
+		  //赋值
+		  Object.assign(dateRef, tmpData);
+		  // console.log(row);
+		  
+		  const startDate = new Date(dateRef.schedulingDateBegin);
+		  const endDate = new Date(dateRef.schedulingDateEnd);
+		  const millisecondsPerDay = 1000 * 60 * 60 * 24;
+		  const differenceInMilliseconds = Math.abs(endDate - startDate);
+		  dateRef.daysDifference = Math.ceil(differenceInMilliseconds / millisecondsPerDay);
+		  
+		  
+        printJS({
+          printable: '#printContent',
+          type: 'html',
+        });
+      }
+
+      return {
+        onPrint,dateRef
+      };
+    },
+  };
+</script>
+
+<style>
+        @page {
+            size: A4;
+            margin: 0;
+        }
+       
+        .a4-table {
+			margin: 0 auto; /* 水平居中 */
+            width: 91%;
+            border-collapse: collapse;
+            table-layout: fixed;
+        }
+        .a4-table td {
+            border: 1px solid #000;
+            padding: 2mm;
+            vertical-align: top;font-size: 3.5mm;
+        }
+        .header-cell {
+           /* font-weight: bold; */
+            text-align: center;
+        }
+        .company-name {
+			margin-top: 5mm;
+            font-size: 5mm;
+			font-family: anticon
+            /* font-weight: bold; */
+        }
+        .form-title {
+            font-size: 6mm;
+            margin-top: 2mm;
+			font-family: anticon
+        }
+        .doc-info {
+            font-size: 4mm;
+            text-align: right;
+        }
+        .full-height {
+            /* height: 14mm; */
+			text-align:center
+        }
+        .large-height {
+            height: 120mm;
+        }
+    </style>

+ 66 - 0
src/views/afterCode/AfterServiceLogs/components/AfterPrintModal.vue

@@ -0,0 +1,66 @@
+<template>
+  <BasicModal v-bind="$attrs" @register="registerModal" title="打印" width="65%" @ok="handleSubmit">
+    <after-service-logs-form ref="formComponent" :formDisabled="formDisabled" :formBpm="false" @success="submitSuccess"></after-service-logs-form>
+  </BasicModal>
+</template>
+
+<script lang="ts">
+  import { ref, unref } from 'vue';
+  import { BasicModal, useModalInner } from '/@/components/Modal';
+  import AfterServiceLogsForm from './AfterPrint.vue';
+
+  export default {
+    name: "TestCgMainVxeModal",
+    components:{
+      BasicModal,
+      AfterServiceLogsForm
+    },
+    emits:['register','success'],
+    setup(_p, {emit}){
+      const formComponent = ref()
+      const isUpdate = ref(true);
+      const formDisabled = ref(true);
+      const title = ref('')
+
+      //表单赋值
+      const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => {
+        setModalProps({confirmLoading: false,showCancelBtn:data?.showFooter,showOkBtn:data?.showFooter});
+        isUpdate.value = !!data?.isUpdate;
+        formDisabled.value = !data?.showFooter;
+        if (unref(isUpdate)) {
+          formComponent.value.onPrint(data.record)
+        }else{
+          formComponent.value.onPrint()
+        }
+      });
+
+      function handleSubmit() {
+        formComponent.value.submitForm();
+      }
+
+      function submitSuccess(){
+        emit('success');
+        closeModal();
+      }
+
+      return {
+        registerModal,
+        title,
+        formComponent,
+        formDisabled,
+        handleSubmit,
+        submitSuccess
+      }
+    }
+  }
+</script>
+<style lang="less" scoped>
+	/** 时间和数字输入框样式 */
+  :deep(.ant-input-number) {
+    width: 100%;
+  }
+
+  :deep(.ant-calendar-picker) {
+    width: 100%;
+  }
+</style>

+ 394 - 0
src/views/afterCode/AfterServiceLogs/components/AfterPrintRow.vue

@@ -0,0 +1,394 @@
+<template>
+  <div ref="accessoriesDetailsRef">
+      <a-modal
+            title="打印" :footer="null"
+            width="70%"
+            :visible="visible"
+            @cancel="handleCancel">
+              <div>
+                <a-button type="primary" style="float:right" ghost @click="onPrint">打印</a-button>
+				<table class="a4-table" id="printContent2">
+				       <!-- 标题行 -->
+				       <tr>
+				           <td colspan="7" style="height:20px;border:none; padding:0">
+				               <table width="100%" style="border:none">
+				                   <tr style="height:20%	;" >
+				                       <td style="text-align:center;width:20%;border:none">
+				                            <img style="height:20mm;width:30mm;margin-top: 12%;"src="/resource/img/logo1.png" alt="公司logo">
+				                       </td>
+				                       <td style="text-align:center;border:none">
+				                           <div class="company-name">上海哥宝海事工程有限公司</div>
+				                           <div class="form-title">外勤工作总结表</div>
+				                       </td>
+				                       <td style="width:20%;border:none">
+				                       </td>
+				                   </tr>
+				                   <tr>
+				                       <td style="width:40mm;border:none; " class="doc-info" colspan="3" >
+				                           表单编号:{{dateRef.billCode}}
+				                           版本:A/1
+				                       </td>
+				                   </tr>
+				               </table>
+				           </td>
+				       </tr>
+				       <!-- 个人信息 -->
+				       <tr>
+				           <td colspan="2" class="header-cell">姓 名</td>
+				           <td  class="header-cell">{{dateRef.schedulingMan}}</td>
+				           <td  class="header-cell">部 门</td>
+				           <td  class="header-cell">{{dateRef.sysOrgCode_dictText}}</td>
+				           <td class="header-cell">日期</td>
+				           <td class="header-cell">{{dateRef.schedulingDate}}</td>
+				       </tr>
+				       <tr>
+				           <td class="full-height">午别</td>
+				           <td class="full-height">工作时间</td>
+				           <td colspan="3" class="full-height">工作内容</td>
+				           <td class="full-height">重要程度</td>
+				           <td  class="full-height">备注</td>
+				       </tr>
+				       
+					   <tr>
+				           <td rowspan="5" style="text-align: center;vertical-align: middle;" class="full-height">上<br/>午</td>
+				           <td class="full-height">7:00-8:00</td>
+				           <td colspan="3" class="full-height">{{dateRef.time78Work}}</td>
+				           <td class="full-height">{{dateRef.time78Degree}}</td>
+				           <td  class="full-height">{{dateRef.time78Notes}}</td>
+				       </tr>
+				       <tr>
+				           
+				           <td class="full-height">8:00-9:00</td>
+				           <td colspan="3" class="full-height">{{dateRef.time89Work}}</td>
+				           <td class="full-height">{{dateRef.time89Degree}}</td>
+				           <td class="full-height">{{dateRef.time89Notes}}</td>
+				       </tr>
+				       <tr>
+				           <td class="full-height">9:00-10:00</td>
+				           <td colspan="3" class="full-height">{{dateRef.time910Work}}</td>
+				           <td class="full-height">{{dateRef.time910Degree}}</td>
+				           <td class="full-height">{{dateRef.time910Notes}}</td>
+
+				       </tr>
+				       <tr>
+				           <td class="full-height">10:00-11:00</td>
+				           <td colspan="3" class="full-height">{{dateRef.time1011Work}}</td>
+				           <td class="full-height">{{dateRef.time1011Degree}}</td>
+				           <td class="full-height">{{dateRef.time1011Notes}}</td>
+
+				       </tr>
+				       <tr>
+				           <td class="full-height">11:00-12:00</td>
+				           <td colspan="3" class="full-height">{{dateRef.time1112Work}}</td>
+				           <td class="full-height">{{dateRef.time1112Degree}}</td>
+				           <td class="full-height">{{dateRef.time1112Notes}}</td>
+				       </tr>
+				       
+				       <tr>
+				           <td rowspan="5" style="text-align: center;vertical-align: middle;" class="full-height">下<br/>午</td>
+				           <td class="full-height">12:00-13:00</td>
+				           <td colspan="3" class="full-height">{{dateRef.time1213Work}}</td>
+				           <td class="full-height">{{dateRef.time1213Degree}}</td>
+				           <td class="full-height">{{dateRef.time1213Notes}}</td>
+				       </tr>
+				       <tr>
+				           <td class="full-height">13:00-14:00</td>
+				           <td colspan="3" class="full-height">{{dateRef.time1314Work}}</td>
+				           <td class="full-height">{{dateRef.time1314Degree}}</td>
+				           <td class="full-height">{{dateRef.time1314Notes}}</td>
+				       </tr>
+				       <tr>
+				           <td class="full-height">14:00-15:00</td>
+				           <td colspan="3" class="full-height">{{dateRef.time1415Work}}</td>
+				           <td class="full-height">{{dateRef.time1415Degree}}</td>
+				           <td class="full-height">{{dateRef.time1415Notes}}</td>
+				       </tr>
+				       <tr>
+				           <td class="full-height">15:00-16:00</td>
+				           <td colspan="3" class="full-height">{{dateRef.time1516Work}}</td>
+				           <td class="full-height">{{dateRef.time1516Degree}}</td>
+				           <td class="full-height">{{dateRef.time1516Notes}}</td>
+				       </tr>
+				       <tr>
+				           <td class="full-height">16:00-17:00</td>
+				           <td colspan="3" class="full-height">{{dateRef.time1617Work}}</td>
+				           <td class="full-height">{{dateRef.time1617Degree}}</td>
+				           <td class="full-height">{{dateRef.time1617Notes}}</td>
+				       </tr>
+				  
+				       <tr>
+				           <td rowspan="6" style="text-align: center;vertical-align: middle;" class="full-height">晚<br/>上</td>
+				           <td class="full-height">17:00-18:00</td>
+				           <td colspan="3" class="full-height">{{dateRef.time1718Work}}</td>
+				           <td class="full-height">{{dateRef.time1718Degree}}</td>
+				           <td class="full-height">{{dateRef.time1718Notes}}</td>
+
+				       </tr>
+				       <tr>
+				           <td class="full-height">18:00-19:00</td>
+				           <td colspan="3" class="full-height">{{dateRef.time1819Work}}</td>
+				           <td class="full-height">{{dateRef.time1819Degree}}</td>
+				           <td class="full-height">{{dateRef.time1819Notes}}</td>
+
+				       </tr>
+				       <tr>
+				           <td class="full-height">19:00-20:00</td>
+				           <td colspan="3" class="full-height">{{dateRef.time1920Work}}</td>
+				           <td class="full-height">{{dateRef.time1920Degree}}</td>
+				           <td class="full-height">{{dateRef.time1920Notes}}</td>
+
+				       </tr>
+				       <tr>
+				           <td class="full-height">20:00-21:00</td>
+				           <td colspan="3" class="full-height">{{dateRef.time2021Work}}</td>
+				           <td class="full-height">{{dateRef.time2021Degree}}</td>
+				           <td class="full-height">{{dateRef.time2021Notes}}</td>
+
+				       </tr>
+				       <tr>
+				           <td class="full-height">21:00-22:00</td>
+				           <td colspan="3" class="full-height">{{dateRef.time2122Work}}</td>
+				           <td class="full-height">{{dateRef.time2122Degree}}</td>
+				           <td class="full-height">{{dateRef.time2122Notes}}</td>
+
+				       </tr>
+				       <tr>
+				           <td class="full-height">22:00-24:00</td>
+				           <td colspan="3" class="full-height">{{dateRef.time2224Work}}</td>
+				           <td class="full-height">{{dateRef.time2224Degree}}</td>
+				           <td class="full-height">{{dateRef.time2224Notes}}</td>
+				       </tr>
+				  
+						<tr>
+				           <td colspan="7" style="vertical-align: top; text-align: left;" class="large-height">补充说明:{{dateRef.notes}}</td>
+				        </tr>
+						
+						<tr>
+				           <td colspan="7" style="text-align: center;border:none;padding-top:20px">Page 1 of 1</td>
+				        </tr>
+				   </table>
+              </div>
+        </a-modal>
+  </div>
+</template>
+
+<script lang="ts" setup>
+    import {ref, computed, unref,reactive} from 'vue';
+    import { useGlobSetting } from '/@/hooks/setting';
+    import {defHttp} from '/@/utils/http/axios';
+    const { domainUrl } = useGlobSetting();
+    var visible = ref(false);
+  import { printJS } from '/@/hooks/web/usePrintJS';
+	
+  var dateRef = reactive<Record<string, any>>({
+     billCode: '',
+     schedulingMan: '',
+     sysOrgCode_dictText: '',
+     schedulingDate: '',
+     notes: '',
+     time78Work: '',
+     time78Degree: '',
+     time78Notes: '',
+     time89Work: '',
+     time89Degree: '',
+     time89Notes: '',
+     time910Work: '',
+     time910Degree: '',
+     time910Notes: '',
+     time1011Work: '',
+     time1011Degree: '',
+     time1011Notes: '',
+     time1112Work: '',
+     time1112Degree: '',
+     time1112Notes: '',
+     time1213Work: '',
+     time1213Degree: '',
+     time1213Notes: '',
+     time1314Work: '',
+     time1314Degree: '',
+     time1314Notes: '',
+     time1415Work: '',
+     time1415Degree: '',
+     time1415Notes: '',
+     time1516Work: '',
+     time1516Degree: '',
+     time1516Notes: '',
+     time1617Work: '',
+     time1617Degree: '',
+     time1617Notes: '',
+     time1718Work: '',
+     time1718Degree: '',
+     time1718Notes: '',
+     time1819Work: '',
+     time1819Degree: '',
+     time1819Notes: '',
+     time1920Work: '',
+     time1920Degree: '',
+     time1920Notes: '',
+     time2021Work: '',
+     time2021Degree: '',
+     time2021Notes: '',
+     time2122Work: '',
+     time2122Degree: '',
+     time2122Notes: '',
+     time2223Work: '',
+     time2223Degree: '',
+     time2223Notes: '',
+     time2324Work: '',
+     time2324Degree: '',
+     time2324Notes: ''  
+   });
+   
+    var dataSource=ref([])
+    const baseUrl = domainUrl + '/sys/common/static/';
+    function getTable(record,billCode,schedulingMan,sysOrgCode_dictText){
+        visible.value = true
+		dateRef.billCode=billCode;
+		dateRef.schedulingMan=schedulingMan;
+		dateRef.sysOrgCode_dictText=sysOrgCode_dictText;
+		dateRef.schedulingDate=record.schedulingDate;
+		dateRef.notes=record.notes;
+		
+		dateRef.time78Work=record.time78Work;
+		dateRef.time78Degree=record.time78Degree;
+		dateRef.time78Notes=record.time78Notes;
+		
+		dateRef.time89Work=record.time89Work;
+		dateRef.time89Degree=record.time89Degree;
+		dateRef.time89Notes=record.time89Notes;
+		
+		dateRef.time910Work=record.time910Work;
+		dateRef.time910Degree=record.time910Degree;
+		dateRef.time910Notes=record.time910Notes;
+		
+		dateRef.time1011Work=record.time1011Work;
+		dateRef.time1011Degree=record.time1011Degree;
+		dateRef.time1011Notes=record.time1011Notes;
+		
+		dateRef.time1112Work=record.time1112Work;
+		dateRef.time1112Degree=record.time1112Degree;
+		dateRef.time1112Notes=record.time1112Notes;
+		
+		dateRef.time1213Work=record.time1213Work;
+		dateRef.time1213Degree=record.time1213Degree;
+		dateRef.time1213Notes=record.time1213Notes;
+		
+		dateRef.time1314Work=record.time1314Work;
+		dateRef.time1314Degree=record.time1314Degree;
+		dateRef.time1314Notes=record.time1314Notes;
+		
+		dateRef.time1415Work=record.time1415Work;
+		dateRef.time1415Degree=record.time1415Degree;
+		dateRef.time1415Notes=record.time1415Notes;
+		
+		dateRef.time1516Work=record.time1516Work;
+		dateRef.time1516Degree=record.time1516Degree;
+		dateRef.time1516Notes=record.time1516Notes;
+		
+		dateRef.time1617Work=record.time1617Work;
+		dateRef.time1617Degree=record.time1617Degree;
+		dateRef.time1617Notes=record.time1617Notes;
+		
+		dateRef.time1718Work=record.time1718Work;
+		dateRef.time1718Degree=record.time1718Degree;
+		dateRef.time1718Notes=record.time1718Notes;
+		
+		dateRef.time1819Work=record.time1819Work;
+		dateRef.time1819Degree=record.time1819Degree;
+		dateRef.time1819Notes=record.time1819Notes;
+		
+		dateRef.time1920Work=record.time1920Work;
+		dateRef.time1920Degree=record.time1920Degree;
+		dateRef.time1920Notes=record.time1920Notes;
+		
+		dateRef.time2021Work=record.time2021Work;
+		dateRef.time2021Degree=record.time2021Degree;
+		dateRef.time2021Notes=record.time2021Notes;
+		
+		dateRef.time2122Work=record.time2122Work;
+		dateRef.time2122Degree=record.time2122Degree;
+		dateRef.time2122Notes=record.time2122Notes;
+		
+		dateRef.time2223Work=record.time2223Work;
+		dateRef.time2223Degree=record.time2223Degree;
+		dateRef.time2223Notes=record.time2223Notes;
+		
+		dateRef.time2324Work=record.time2324Work;
+		dateRef.time2324Degree=record.time2324Degree;
+		dateRef.time2324Notes=record.time2324Notes;
+		
+		printJS({
+		  printable: '#printContent2',
+		  type: 'html',
+		});
+    }
+	
+	function onPrint() {
+		printJS({
+		  printable: '#printContent2',
+		  type: 'html',
+		});
+	}
+    function handleCancel(){
+      visible.value = false;
+    }
+    defineExpose({
+      getTable
+    });
+  </script>
+
+<style lang="less" scoped>
+	@page {
+	    size: A4;
+	    margin: 0;
+	}
+	       
+	.a4-table {
+		margin: 0 auto; /* 水平居中 */
+	    width: 91%;
+	    border-collapse: collapse;
+	    table-layout: fixed;
+	}
+	.a4-table td {
+	    border: 1px solid #000;
+	    padding: 2mm;
+	    vertical-align: top;font-size: 3.5mm;
+	}
+	.header-cell {
+	   /* font-weight: bold; */
+	    text-align: center;
+	}
+	.company-name {
+		margin-top: 5mm;
+	    font-size: 5mm;
+		font-family: anticon
+	    /* font-weight: bold; */
+	}
+	.form-title {
+	    font-size: 6mm;
+	    margin-top: 2mm;
+		font-family: anticon
+	}
+	.doc-info {
+	    font-size: 4mm;
+	    text-align: right;
+	}
+	.full-height {
+	    /* height: 14mm; */
+		text-align:center
+	}
+	.large-height {
+	    height: 50mm;
+	}
+	/** 时间和数字输入框样式 */
+  :deep(.ant-input-number) {
+    width: 100%;
+  }
+
+  :deep(.ant-calendar-picker) {
+    width: 100%;
+  }
+  /deep/.ant-modal-body{
+    padding: 14px !important;
+  }
+</style>

+ 21 - 3
src/views/afterCode/AfterServiceLogs/components/AfterServiceLogsForm.vue

@@ -103,10 +103,15 @@
           :disabled="disabled"
           :rowNumber="true"
           :rowSelection="false"
-          :toolbar="false"/>
+          :toolbar="false">
+          <template #action="props">
+            <a @click="viewPrint(props)">打印(print)</a>
+          </template>
+        </j-vxe-table>
       </a-tab-pane>
     </a-tabs>
 	<SelectProjectModal ref="SelectProjectModalRef" @select-project="addProject" />
+	<AfterPrintRow ref="AfterPrintRowRef" />
   </a-spin>
 </template>
 
@@ -124,6 +129,7 @@
   import JSelectInput from '/@/components/Form/src/jeecg/components/JSelectInput.vue';
   import dayjs from 'dayjs';
   import SelectProjectModal from '../../../publicComponents/SelectProjectModal.vue';
+  import AfterPrintRow from './AfterPrintRow.vue';
   const useForm = Form.useForm;
 
   export default defineComponent({
@@ -136,6 +142,7 @@
       JSelectInput,
       JSelectMultiple,
 		SelectProjectModal,
+		AfterPrintRow,
     },
     props:{
       formDisabled:{
@@ -150,6 +157,7 @@
       const loading = ref(false);
       const formRef = ref();
       var SelectProjectModalRef = ref();
+      var AfterPrintRowRef = ref();
       var schedulingDate = ref([]);
       const afterServiceLogsDetailsTableRef = ref();
       const afterServiceLogsDetailsTable = reactive<Record<string, any>>({
@@ -160,6 +168,7 @@
       const activeKey = ref('afterServiceLogsDetails');
       const formData = reactive<Record<string, any>>({
         id: '',
+        billCode: '',
         billDate: dayjs(new Date()).format('YYYY-MM-DD'),
         projectManager: '',   
         project: '',   
@@ -168,11 +177,13 @@
         customer: '',   
         customerName: '',   
         address: '',   
+        travelMode: '',   
         schedulingDateBegin: '',   
         schedulingDateEnd: '',   
         schedulingMan: '',   
         maintenanceLog: '',   
         attsch: '',   
+        sysOrgCode_dictText: '',   
       });
 
       //表单验证
@@ -200,7 +211,11 @@
         return props.formDisabled;
       });
 
-      
+      //打印
+      function viewPrint(prop) {
+		 
+        AfterPrintRowRef.value.getTable(prop.row,formData.billCode,formData.schedulingMan,formData.sysOrgCode_dictText);
+      }
       function onSearchProject() {
         SelectProjectModalRef.value.getTable();
       }
@@ -253,7 +268,8 @@
 		
 		schedulingDate.value[0] = formData.schedulingDateBegin ? dayjs(formData.schedulingDateBegin, 'YYYY-MM-DD') : '';
 		schedulingDate.value[1] = formData.schedulingDateEnd ? dayjs(formData.schedulingDateEnd, 'YYYY-MM-DD') : '';
-      }
+		formData.sysOrgCode_dictText = row.sysOrgCode_dictText
+	  }
 
       async function queryMainData(id) {
         const row = await queryDataById(id);
@@ -339,6 +355,8 @@
         onChangeSchedulingDate,
         schedulingDate,
 		SelectProjectModalRef,
+		viewPrint,
+		AfterPrintRowRef
       }
     }
   });

+ 18 - 0
src/views/platformBusiness/commissionOrder/commissionOrder.vue

@@ -135,6 +135,10 @@
   import { JDictSelectTag, JInput ,JSelect} from '/@/components/Form';
   import commissionOrderModal from './components/commissionOrderModal.vue';
   import { message } from 'ant-design-vue';
+  
+  import { useMethods } from '/@/hooks/system/useMethods';
+  const { handleExportXlsx, } = useMethods();
+  
   const formRef = ref();
   const queryParam = reactive<any>({});
   const checkedKeys = ref<Array<string | number>>([]);
@@ -224,11 +228,25 @@
   function handleSuccess() {
     (selectedRowKeys.value = []) && reload();
   }
+  
+  
+  
+  async function handleRowExport(record){
+    var obj={
+      id : record.id
+    }
+    handleExportXlsx('OA - '+record.billCode, "/platCode/platCommissionOrder/exportBillXls",obj)
+  }
+  
   /**
    * 操作栏
    */
   function getTableAction(record) {
     return [
+		{
+		  label: '导出(export)',
+		  onClick: handleRowExport.bind(null, record),
+		},
       {
         label: '编辑(edit)',
         onClick: handleEdit.bind(null, record),

+ 2 - 1
src/views/publicComponents/SelectSaleOrderModal.vue

@@ -605,7 +605,8 @@
             }else{
                 fatherSourceCode.value = ''
             }
-            fatherType.value='other'
+            // fatherType.value='other'
+            fatherType.value='saleOrder'//此处变更为 发货通知单选择销售订单时 不在限制是否同一供应商
             showCustomer.value = 'yes'
             getListUrl.value ='/saleCode/saleOrder/selectSaleOrderDetailAlertDelivery'
             columns= columns1.filter(function(value, i) {

+ 34 - 16
src/views/purchase/purchaseOrder/PurchaseOrderFormList.vue

@@ -7,8 +7,10 @@
           <a-col :lg="8">
             <a-form-item name="billDate">
               <template #label><span title="单据日期(bill date)">单据日期(bill date)</span></template>
-              <a-range-picker value-format="YYYY-MM-DD" v-model:value="queryParam.billDate" class="query-group-cust" />
-            </a-form-item>
+              <!-- <a-range-picker value-format="YYYY-MM-DD" v-model:value="queryParam.billDate"  @change="onChangeDate" class="query-group-cust" /> -->
+            <a-range-picker :format="['YYYY-MM-DD', 'YYYY-MM-DD']" v-model:value="queryParam.billDate1" @change="onChangeDate" class="query-group-cust" />
+            
+			</a-form-item>
           </a-col>
           <a-col :lg="8">
             <a-form-item name="project" >
@@ -531,6 +533,19 @@
       cancelBatchConfirm({ ids: ids }, handleSuccess);
     }
   }
+  
+  function onChangeDate(data) {
+	  console.log(1111111111111);
+	  if(data == null){
+		  queryParam.billDate_begin = null;
+		  queryParam.billDate_end = null;
+	  }else{
+		  queryParam.billDate_begin = data[0].format('YYYY-MM-DD');
+		  queryParam.billDate_end = data[1].format('YYYY-MM-DD');
+	  }
+	console.log(queryParam.billDate_begin);
+	console.log(queryParam.billDate_end);
+  }
 
   function viewFileDetail(props) {
     ViewFileListModalRef.value.getTable(props.column.dataIndex, props.record);
@@ -573,6 +588,9 @@
    * 重置
    */
   function searchReset() {
+	  queryParam.billDate1 = null;
+	  		  queryParam.billDate_begin = null;
+	  		  queryParam.billDate_end = null;
     formRef.value.resetFields();
     selectedRowKeys.value = [];
     //刷新数据
@@ -586,20 +604,20 @@
    */
   async function setRangeQuery() {
     let queryParamClone = cloneDeep(queryParam);
-    if (rangeField) {
-      let fieldsValue = rangeField.split(',');
-      fieldsValue.forEach((item) => {
-        if (queryParamClone[item]) {
-          let range = queryParamClone[item];
-          queryParamClone[item + '_begin'] = range[0];
-          queryParamClone[item + '_end'] = range[1];
-          delete queryParamClone[item];
-        } else {
-          queryParamClone[item + '_begin'] = '';
-          queryParamClone[item + '_end'] = '';
-        }
-      });
-    }
+    // if (rangeField) {
+    //   let fieldsValue = rangeField.split(',');
+    //   fieldsValue.forEach((item) => {
+    //     if (queryParamClone[item]) {
+    //       let range = queryParamClone[item];
+    //       queryParamClone[item + '_begin'] = range[0];
+    //       queryParamClone[item + '_end'] = range[1];
+    //       delete queryParamClone[item];
+    //     } else {
+    //       queryParamClone[item + '_begin'] = '';
+    //       queryParamClone[item + '_end'] = '';
+    //     }
+    //   });
+    // }
     return queryParamClone;
   }
 </script>

+ 6 - 6
src/views/saleCode/quotation/components/quotationFormForm.vue

@@ -1098,15 +1098,15 @@
             ((prop.row.purchasePrice * Number(formData.exchangeRate) * (1 + prop.row.tariff / 100)) /
               (1 - prop.row.grossMargin / 100 - prop.row.customerCommision / 100 - prop.row.intermediatorCommission / 100)) *
             (1 + prop.row.taxRate / 100);
-          prop.row.salePrice = !isNaN(num) ? num.toFixed(2) : '';
-          prop.row.taxPriceOriginal = (prop.row.salePrice / (1 - prop.row.discount / 100)).toFixed(2);
+          prop.row.salePrice = !isNaN(num) ? num.toFixed(4) : '';
+          prop.row.taxPriceOriginal = (prop.row.salePrice / (1 - prop.row.discount / 100)).toFixed(4);
           if (prop.row.quantity) {
             prop.row.taxAmount = (prop.row.salePrice * prop.row.quantity).toFixed(2); //计算金额
             prop.row.purchaseAmount = (prop.row.purchasePrice * prop.row.quantity).toFixed(2); //计算采购金额
           }
         }
         if (prop.col.key == 'discount' && prop.row.taxPriceOriginal) {
-          prop.row.salePrice = (Number(prop.row.taxPriceOriginal) * (1 - prop.row.discount / 100)).toFixed(2);
+          prop.row.salePrice = (Number(prop.row.taxPriceOriginal) * (1 - prop.row.discount / 100)).toFixed(4);
 		  if (prop.row.quantity) {
 		    prop.row.taxAmount = (prop.row.salePrice * prop.row.quantity).toFixed(2);
 		  }
@@ -1121,7 +1121,7 @@
         }
         //计算毛利率/金额
         if (prop.col.key == 'taxPriceOriginal') {
-          prop.row.salePrice = (Number(prop.row.taxPriceOriginal) * (1 - prop.row.discount / 100)).toFixed(2);
+          prop.row.salePrice = (Number(prop.row.taxPriceOriginal) * (1 - prop.row.discount / 100)).toFixed(4);
           // var num =1 - prop.row.customerCommision / 100 - prop.row.intermediatorCommission / 100-((prop.row.purchasePrice / Number(formData.exchangeRate)) *(1 + prop.row.taxRate / 100) *(1 + prop.row.tariff / 100) *(1 - prop.row.discount / 100)) /prop.row.salePrice;
           var num =
             1 -
@@ -1157,8 +1157,8 @@
               ((item.purchasePrice * Number(formData.exchangeRate) * (1 + item.tariff / 100)) /
                 (1 - item.grossMargin / 100 - item.customerCommision / 100 - item.intermediatorCommission / 100)) *
               (1 + item.taxRate / 100);
-            item.salePrice = !isNaN(num) ? num.toFixed(2) : '';
-            item.taxPriceOriginal = (item.salePrice / (1 - item.discount / 100)).toFixed(2);
+            item.salePrice = !isNaN(num) ? num.toFixed(4) : '';
+            item.taxPriceOriginal = (item.salePrice / (1 - item.discount / 100)).toFixed(4);
             if (item.quantity) {
               item.taxAmount = (item.salePrice * item.quantity).toFixed(2);
             }

+ 4 - 0
src/views/saleCode/saleInquiryForm/components/SaleInquiryFormForm.vue

@@ -429,6 +429,10 @@
         formData.projectName = '';
         formData.customerInquiryNumber = '';
         formData.attachs = '';
+        formData.salesman = userStore.getUserInfo.username;
+        formData.salesmanName = userStore.getUserInfo.realname;
+        formData.saleDepartment = userStore.getUserInfo.orgCode;
+        formData.saleDepartmentName = userStore.getUserInfo.orgName;
         //子表数据
         const saleInquiryFormShipDataList = await querySaleInquiryFormShipListByMainId(id);
         saleInquiryFormShipTable.dataSource = [...saleInquiryFormShipDataList];

+ 1 - 0
src/views/saleCode/salesOrder/components/SlaeOrderFormForm.vue

@@ -509,6 +509,7 @@
 
       //表单验证
       const validatorRules = reactive({
+        customerOrder: [{ required: true, message: '客户订单号不能为空(customerOrder)' }],
         projectName: [{ required: true, message: '请选择项目(select project)' }],
         organize: [{ required: true, message: '请选择组织(select organize)' }],
         currency: [{ required: true, message: '请选择币种(select currency)' }],