YangJian0701 1 gadu atpakaļ
vecāks
revīzija
815a7f5f6b

BIN
ERP.rar


+ 6 - 7
src/views/salary/ReimburseMy.vue

@@ -205,7 +205,7 @@ const data = reactive({
         ReimburseDetails:[{
             mapPick: [],
             selectData:[],
-            T_approval_money:"",
+            T_approval_money:null,
             T_approval_opinion:"",
             T_trip_start_time: "",
             T_trip_end_time: "",
@@ -271,12 +271,13 @@ const subData = () => {
 }
 //编辑
 const seteditApi = async()=>{
-    console.log('编辑',data.fromData)
     let obj = {...data.fromData}
     obj.T_money = Number(obj.T_money)
-    obj.ReimburseDetails.forEach(item=>{
+    obj.ReimburseDetails.forEach((item:any)=>{
         item.T_money = Number(item.T_money)
     })
+    console.log('编辑111',obj)
+
     const resIt: any = await ReimburseMy_Edit(obj)
     console.log('编辑', resIt)
     if (resIt.Code == 200) {
@@ -361,10 +362,8 @@ const handleCurrentChange = (val: number) => {
 }
 //显示弹窗
 const showDrawer = (e: string, datas: any) => {
-    
     let id
     if (datas) id = datas.Id
-    
     switch (e) {
         case 'news':
             FeeTypeApi()//获取费用类型
@@ -378,7 +377,7 @@ const showDrawer = (e: string, datas: any) => {
                 ReimburseDetails: [{
                     mapPick: [],
                     selectData:[],
-                    T_approval_money:"",
+                    T_approval_money:null,
                     T_approval_opinion:"",
                     T_trip_start_time: "",
                     T_trip_end_time: "",
@@ -461,7 +460,7 @@ const newAdd = () => {
     data.fromData.ReimburseDetails.push({
         mapPick: [],
         selectData:[],
-        T_approval_money:"",
+        T_approval_money:null,
         T_approval_opinion:"",
         T_trip_start_time: "",
         T_trip_end_time: "",

+ 5 - 1
src/views/salary/SalaryCount.vue

@@ -32,7 +32,8 @@ interface SpanMethodProps {
 
 let date = new Date()
 const year = date.getFullYear()
-const month = date.getMonth()
+const month = date.getMonth()+1
+
 const salaryFromData = reactive({
   year: year + '',
   month: (month < 10 ? '0' : '') + month,
@@ -75,11 +76,14 @@ const tableTH = [
 const salarDateYearChange = (val: string) => {
   if (!val) return
   initParam.T_date = `${val}-${salaryFromData.month}`
+  console.log('默认',initParam.T_date,val)
+
   getSalary_List()
 }
 const salarDateMonthChange = (val: string) => {
   if (!val) return
   initParam.T_date = `${salaryFromData.year}-${val}`
+  console.log('月份',initParam.T_date,val)
   getSalary_List()
 }
 

+ 33 - 18
src/views/storehouse/inventory/MyPercentageFormStorage.vue

@@ -19,7 +19,7 @@ const initParam = reactive({
   User_tokey: globalStore.GET_User_tokey,
   page: 1,
   page_z: 20,
-  T_type:1
+  T_type: 1
 })
 const callbackProductDrawer = (done: () => void) => done()
 // 搜索模型
@@ -50,8 +50,8 @@ const ProductselectionChange = (selection: any[], row: any) => emit('ontableData
 
 
 //函数
-const selectFun = async (val:any)=>{
-  console.log('选中',val,)
+const selectFun = async (val: any) => {
+  console.log('选中', val,)
 }
 const ProductSelectionAllChange = (selection: any[]) => emit('ontableDataAll', selection)
 // 获取产品的列表
@@ -92,9 +92,26 @@ const selectTableChange = (row: any) => {
 }
 
 // props
-const props = defineProps<{ selectProductData?: any[] }>()
+const props = defineProps<{ selectProductData?: any[]}>()
 const selectProductData = ref(props.selectProductData)
+
 const emit = defineEmits<{ (event: 'ontableData', value: any): void; (event: 'ontableDataAll', value: any[]): void }>()
+
+interface User {
+  T_id: number
+  T_name: string
+  T_num: number
+  count: number
+}
+
+const toggleSelectionFun = (rows?: User[]) => {
+  if (rows) {
+    rows.forEach((row) => {
+      selectTable.value!.toggleRowSelection(row, undefined)
+    })
+  }
+}
+
 defineExpose({
   openDrawer,
   clearSelection,
@@ -104,7 +121,9 @@ defineExpose({
   initParam,
   tableProductData,
   selectTable,
+  toggleSelectionFun
 })
+
 </script>
 
 <template>
@@ -113,22 +132,12 @@ defineExpose({
       <h4 :id="params.titleId" :class="params.titleClass">选择</h4>
     </template>
     <el-card class="box-card" shadow="never">
-      <el-table
-        @selection-change="selectFun"
-        ref="selectTable"
-        :row-key="getRowKey"
-        :data="tableProductData"
-        style="width: 100%; height: 99%"
-        :header-cell-style="{
+      <el-table @selection-change="selectFun" ref="selectTable" :row-key="getRowKey" :expand-row-keys="[0]"
+        :data="tableProductData" style="width: 100%; height: 99%" :header-cell-style="{
           background: '#dedfe0',
           height: '50px'
-        }"
-        v-el-table-infinite-scroll="load"
-        :infinite-scroll-immediate="false"
-        infinite-scroll-distance="'50px'"
-        @select="ProductselectionChange"
-        @select-all="ProductSelectionAllChange"
-      >
+        }" v-el-table-infinite-scroll="load" :infinite-scroll-immediate="false" infinite-scroll-distance="'50px'"
+        @select="ProductselectionChange" @select-all="ProductSelectionAllChange">
         <template v-for="item in productColumns" :key="item">
           <el-table-column v-if="item.type === 'index' || item.type === 'selection'" align="center" v-bind="item" />
           <el-table-column v-if="!item.ellipsis && item.prop" v-bind="item">
@@ -168,20 +177,26 @@ defineExpose({
   max-width: 500px;
   overflow-y: auto;
 }
+
 .box-card {
   height: 100%;
+
   :deep(.el-card__body) {
     height: calc(100% - 70px);
   }
+
   .sn-header {
     display: flex;
     justify-content: end;
   }
+
   .input-suffix {
     width: 100%;
+
     .inline-flex {
       white-space: nowrap;
     }
+
     .d-flex {
       display: flex;
     }

+ 14 - 4
src/views/storehouse/sales/MyPercentageForm.vue

@@ -156,18 +156,28 @@ const drawerProductRef = ref<InstanceType<typeof MyPercentageFormStorage> | null
 const AddProductionDetailed = () => {
   // selectTable.value.toggleRowSelection(tableProductData.value.find(item => {return 1 == item.Id;}), true )
 
+
+  //有问题
   isProduct.value = true
   nextTick(() => {
     drawerProductRef!.value!.initParam!.T_type = form.T_type || undefined
     drawerProductRef.value?.searchModelHandle()
     drawerProductRef.value?.openDrawer()
     console.log('添加',tableData.value,drawerProductRef.value)
-    tableData.value.forEach((row:any)=>{
-      drawerProductRef.value!.selectTable.value.toggleRowSelection(
-        drawerProductRef!.value!.tableProductData.find((item:any) => {return row.Id == item.Id;}), true )
-    })
+    if(drawerProductRef.value){
+      drawerProductRef.value.toggleSelectionFun(tableData.value)
+    }
   })
 }
+
+interface User {
+  T_id: number
+  T_name: string
+  T_num: number
+  count: number
+}
+
+
 /**
  * 产品选择 是否
  */

+ 4 - 2
src/views/storehouse/sales/VerifyForm.vue

@@ -59,7 +59,8 @@ const callbackDrawer = (done: () => void) => {
 // 父级方法
 const emit = defineEmits<{ (event: 'onTableList'): void }>()
 
-const form = ref<ContractFormType>({
+const form:any = ref<ContractFormType>({
+  
   T_uuid: '',
   T_number: '',
   T_product: '',
@@ -74,7 +75,8 @@ const form = ref<ContractFormType>({
   T_invoice: '',
   T_submit_name: '',
   T_start_date: '',
-  T_end_date: ''
+  T_end_date: '',
+  T_type: '', T_uuid_name: '', T_remit: ''
 })
 
 const openDrawer = (type: string, row?: any) => {