zhangqiOMG 2 лет назад
Родитель
Сommit
2eb08b4421
23 измененных файлов с 79 добавлено и 58 удалено
  1. 2 2
      src/DRP/HDrpManagement/customizedSizeScheme/detail/index.vue
  2. 1 1
      src/DRP/HDrpManagement/customizedSizeScheme/detail/modules/edit.vue
  3. 1 1
      src/DRP/HDrpManagement/customizedSizeScheme/detail/modules/options.vue
  4. 1 1
      src/DRP/HDrpManagement/customizedSizeScheme/modules/add.vue
  5. 1 1
      src/DRP/HDrpManagement/customizedSolution/index.vue
  6. 1 1
      src/DRP/HDrpManagement/customizedSolution/modules/add.vue
  7. 2 2
      src/DRP/HDrpManagement/customizedSolution/modules/solmx.vue
  8. 2 5
      src/DRP/HDrpManagement/dispatchMxList/index.vue
  9. 1 1
      src/DRP/HDrpManagement/enterpriseArchives/detail/modules/edit.vue
  10. 1 1
      src/DRP/HDrpManagement/enterpriseArchives/modules/add.vue
  11. 2 5
      src/DRP/HDrpManagement/orderManage/detail/index.vue
  12. 3 3
      src/DRP/HDrpManagement/productGroupManage/detail/index.vue
  13. 1 1
      src/DRP/HDrpManagement/productGroupManage/detail/modules/edit.vue
  14. 1 1
      src/DRP/HDrpManagement/productGroupManage/modules/add.vue
  15. 2 2
      src/DRP/HDrpManagement/productManage/detail/index.vue
  16. 6 8
      src/DRP/HDrpManagement/productManage/index.vue
  17. 4 3
      src/DRP/HDrpManagement/productManage/modules/batchOperation.vue
  18. 1 1
      src/DRP/HDrpManagement/returnedPurchase/detail/modules/edit.vue
  19. 1 1
      src/DRP/HDrpManagement/transferAccounts/detail/modules/edit.vue
  20. 1 1
      src/DRP/HDrpManagement/transferAccounts/modules/add.vue
  21. 4 2
      src/DRP/SDrpManagement/productGroup/detail/index.vue
  22. 37 9
      src/components/detailTemplate/index.vue
  23. 3 5
      src/components/listTemplate/index.vue

+ 2 - 2
src/DRP/HDrpManagement/customizedSizeScheme/detail/index.vue

@@ -115,7 +115,7 @@ const onSuccess = ()=>{
   list.value.listData()
 }
 const deleteMx = async (item)=>{
-  const res = await Api.requested({
+  const res = await Api.post({
     "id": "20230707093303",
     "content": {
       "sa_sizeschemedetailids":[item.sa_sizeschemedetailid]
@@ -137,7 +137,7 @@ const saveData = async ()=>{
   })
 }
 const checkBill = async (bool)=>{
-  const res = await Api.requested({
+  const res = await Api.post({
     "id": "20230707111103",
     "version":1,
     "content": {

+ 1 - 1
src/DRP/HDrpManagement/customizedSizeScheme/detail/modules/edit.vue

@@ -76,7 +76,7 @@ const onClose = () => {
 const submit = async ()=>{
   try {
     const values = await formRef.value.validateFields();
-    const res = await Api.requested({
+    const res = await Api.post({
       id:20230707091503,
       content:form.value
     })

+ 1 - 1
src/DRP/HDrpManagement/customizedSizeScheme/detail/modules/options.vue

@@ -46,7 +46,7 @@ const onClose = () => {
 const submit = async ()=>{
   try {
     const values = await formRef.value.validateFields();
-    const res = await Api.requested({
+    const res = await Api.post({
       "id": "20230707093103",
       "content":form.value
     })

+ 1 - 1
src/DRP/HDrpManagement/customizedSizeScheme/modules/add.vue

@@ -74,7 +74,7 @@ const onClose = () => {
 const submit = async ()=>{
   try {
     const values = await formRef.value.validateFields();
-    const res = await Api.requested({
+    const res = await Api.post({
       id:20230707091503,
       content:form.value
     })

+ 1 - 1
src/DRP/HDrpManagement/customizedSolution/index.vue

@@ -46,7 +46,7 @@
     list.value.tableData()
   }
   const deleteRow = async (data)=>{
-    const res = await Api.requested({
+    const res = await Api.post({
       id:20230321154003,
       content:{
         sa_customschemeids:[data.sa_customschemeid]

+ 1 - 1
src/DRP/HDrpManagement/customizedSolution/modules/add.vue

@@ -62,7 +62,7 @@ const onClose = () => {
 const submit = async ()=>{
   try {
     const values = await formRef.value.validateFields();
-    const res = await Api.requested({
+    const res = await Api.post({
       id:20230321153703,
       content:form.value
     })

+ 2 - 2
src/DRP/HDrpManagement/customizedSolution/modules/solmx.vue

@@ -13,7 +13,7 @@
       :ok-button-props="{ disabled: !utils.hasPermission('edit')}"
     > 
       <a-space>
-        <a-button :type="checked(item)?'primary':''" v-for="item in optionsData" :key="item.index" @click="addOptionToSol(item)" block>{{item.description}}</a-button>
+        <a-button :type="checked(item)?'primary':'default'" v-for="item in optionsData" :key="item.index" @click="addOptionToSol(item)" block>{{item.description}}</a-button>
       </a-space>
     </a-modal>
   </div>
@@ -52,7 +52,7 @@ const onClose = () => {
 };
 const submit = async ()=>{
   try {
-    const res = await Api.requested({
+    const res = await Api.post({
       id:20230321155503,
       content:{
         sa_customschemeid:props.sa_customschemeid,

+ 2 - 5
src/DRP/HDrpManagement/dispatchMxList/index.vue

@@ -9,10 +9,10 @@
       </template>
       <template #tb_cell="{data}">
         <template v-if="data.column.dataIndex === 'billno'">
-          <a-button type="link" size="small" @click="base.openDrawerPage('dispatchDetail',data.record.sa_dispatchid)">{{data.record.billno}}</a-button>
+          <a-button type="link" size="small" @click="router.push({path:'/dispatchDetail',query:{id:data.record.sa_dispatchid}})">{{data.record.billno}}</a-button>
         </template>
         <template v-if="data.column.dataIndex === 'sonum'">
-          <a-button type="link" size="small" @click="base.openDrawerPage('orderdetail',data.record.sa_orderid)">{{data.record.sonum}}</a-button>
+          <a-button type="link" size="small" @click="router.push({path:'/orderdetail',query:{id:data.record.sa_orderid}})">{{data.record.sonum}}</a-button>
         </template>
         <template v-if="data.column.dataIndex === 'amount'">
           <span>{{utils.formatAmount(data.record.amount)}}</span>
@@ -26,9 +26,6 @@
   import Api from '@/api/api'
   import listTemp from '@/components/listTemplate/index.vue';
   import tableExport from '@/components/tableExport/index.vue'
-  import { storeToRefs } from 'pinia'
-  import { useBaseStore } from '@/stores/modules/base'
-  const base = useBaseStore()
   import { ref } from 'vue'
   import { useRouter } from "vue-router";
   import { onMounted } from "vue";

+ 1 - 1
src/DRP/HDrpManagement/enterpriseArchives/detail/modules/edit.vue

@@ -10,7 +10,7 @@
       :closable="false"
       @close="onClose"
     >
-      <a-form :model="form" ref="formRef" size="small" layout="vertical">
+      <a-form :model="form" ref="formRef" layout="vertical">
         <a-row :gutter="16">
           <a-col :span="24">
             <a-form-item label="企业名称" name="enterprisename" :rules="[{ required: true, message: '请输入企业名称' }]">

+ 1 - 1
src/DRP/HDrpManagement/enterpriseArchives/modules/add.vue

@@ -10,7 +10,7 @@
       :closable="false"
       @close="onClose"
     >
-      <a-form :model="form" ref="formRef" size="small" layout="vertical">
+      <a-form :model="form" ref="formRef" layout="vertical">
         <a-row :gutter="16">
           <a-col :span="24">
             <a-form-item label="企业名称" name="enterprisename" :rules="[{ required: true, message: '请输入企业名称' }]">

+ 2 - 5
src/DRP/HDrpManagement/orderManage/detail/index.vue

@@ -7,7 +7,6 @@
     :delParam="{id:'20221108152102',content:{sa_orderids:[router.currentRoute.value.query.id]}}" 
     ownertable="sa_order" 
     :disable="utils.isDisabled(orderData.status,[],(orderData.status !== '新建'))"
-    :pageUp="mianData"
     >
       <template #operation>
         <a-space>
@@ -157,17 +156,15 @@ const canEdit = computed(()=>{
   }
 })
 const orderData = ref({})
-const mianData = async (rowindex,callback)=>{
+const mianData = async (...args)=>{
   const res = await Api.requested({
     "id":'20221108151302',
     "content": {
       "nocache":true,
-      "sa_orderid": router.currentRoute.value.query.id,
-      "rowindex":rowindex ? rowindex:''
+      "sa_orderid":router.currentRoute.value.query.id,
     }
   })
   orderData.value = res.data
-  callback ? callback(res.data.sa_orderid) : ''
   changeDataStructure(res.data)
 }
 const changeDataStructure = (data) => {

+ 3 - 3
src/DRP/HDrpManagement/productGroupManage/detail/index.vue

@@ -66,7 +66,7 @@ const changeDataStructure = (data) => {
   ]
 }
 const shelvesUp = async ()=> {
-  const res = await Api.requested({
+  const res = await Api.post({
     "id": "20220923143603",
     "content": {
       "sa_itemgroupids":[groupData.value.sa_itemgroupid]
@@ -78,8 +78,8 @@ const shelvesUp = async ()=> {
   })
 
 }
-const  shelvesDown = async ()=>{
-  const res = await Api.requested({
+const shelvesDown = async ()=>{
+  const res = await Api.post({
     "id": "20220923143703",
     "content": {
       "sa_itemgroupids":[groupData.value.sa_itemgroupid]

+ 1 - 1
src/DRP/HDrpManagement/productGroupManage/detail/modules/edit.vue

@@ -86,7 +86,7 @@ const submit = async () => {
   try {
     const values = await formRef.value.validateFields();
     console.log('Success:', values);
-    const res = await Api.requested({
+    const res = await Api.post({
       "id":20220922164303,
       "content":form.value
     })

+ 1 - 1
src/DRP/HDrpManagement/productGroupManage/modules/add.vue

@@ -94,7 +94,7 @@ const submit = async () => {
   try {
     const values = await formRef.value.validateFields();
     console.log('Success:', values);
-    const res = await Api.requested({
+    const res = await Api.post({
       "id":20220922164303,
       "content":form.value
     })

+ 2 - 2
src/DRP/HDrpManagement/productManage/detail/index.vue

@@ -153,13 +153,13 @@ const changeDataStructure = (data) => {
 const checkProduct = async (checkStatus)=>{
   console.log(message.success)
   message.success('This is a prompt message for success, and it will disappear in 10 seconds', 10);
-  const res = await Api.requested({"content":{"itemids":[productData.value.itemid],"status":checkStatus},"id":"20220923153902",})
+  const res = await Api.post({"content":{"itemids":[productData.value.itemid],"status":checkStatus},"id":"20220923153902",})
   utils.message(res,checkStatus == 1?'审核成功!':'反审成功!',()=>{
     mianData()
   })
 }
 const groundingProduct = async (isonsale) =>{
-  const res = await Api.requested({"id":20220923154802,"content":{"itemids":[productData.value.itemid],"isonsale":isonsale}})
+  const res = await Api.post({"id":20220923154802,"content":{"itemids":[productData.value.itemid],"isonsale":isonsale}})
   utils.message(res,isonsale == 1?'上架成功!':'下架成功!',()=>{
     mianData()
   })

+ 6 - 8
src/DRP/HDrpManagement/productManage/index.vue

@@ -1,9 +1,9 @@
 <template>
   <div>
-    <listTemp :columns="columns" :param="param" keyRouteName="itemname" :tableName="'productManageTable'" :searchType="searchType" :detailPage="{name:'productmagDetail',idname:'itemid'}">
+    <listTemp ref="list" :columns="columns" :param="param" keyRouteName="itemname" :tableName="'productManageTable'" :searchType="searchType" :detailPage="{name:'productmagDetail',idname:'itemid'}">
       <template #operation>
         <a-space>
-          <batch-operation></batch-operation>
+          <batch-operation @onSuccess="onSuccess"></batch-operation>
         </a-space>
       </template>
       <template #tb_cell="{data}">
@@ -37,11 +37,6 @@
     </listTemp>
   </div>
 </template>
-<script>
-export default {
-  name:'productmag'
-}
-</script>
 <script setup>
   import listTemp from '@/components/listTemplate/index.vue';
   import batchOperation from './modules/batchOperation.vue';
@@ -75,7 +70,10 @@ export default {
     const res = await Api.optionstype('tradefield')
     tradefield.value = res.data
   }
-
+  const list = ref()
+  const onSuccess = ()=>{
+    list.value.tableData()
+  }
   onMounted (()=>{
     fieldData()
   })

+ 4 - 3
src/DRP/HDrpManagement/productManage/modules/batchOperation.vue

@@ -31,13 +31,13 @@
 </template>
 
 <script setup>
-import { nextTick, ref,createVNode } from 'vue';
+import { nextTick, ref,createVNode,defineEmits } from 'vue';
 import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
 import { Modal } from 'ant-design-vue';
 import Api from '@/api/api'
 import utils from '@/utils/utils'
 import normalTable from '@/template/normalTable/index.vue';
-import { log } from '@antv/g2plot/lib/utils';
+const emit = defineEmits(['onSuccess'])
 const open = ref(false)
 const param = ref({
   id:20220923140602,
@@ -80,9 +80,10 @@ const changeIsOnSale = async ()=> {
             itemids:selection.value.map(e=>e.itemid)
           }
         })
-        utils.message(res,'上架成功',()=>{
+        utils.message(res,`${param.value.content.where.isonsale == 1?'下架':'上架'}成功`,()=>{
           list.value.listData()
           list.value.reloadSelect()
+          emit('onSuccess')
         })
       } catch(err) {
         return console.log(err);

+ 1 - 1
src/DRP/HDrpManagement/returnedPurchase/detail/modules/edit.vue

@@ -10,7 +10,7 @@
       :closable="false"
       @close="onClose"
     >
-      <a-form :model="form" ref="formRef" size="small" layout="vertical">
+      <a-form :model="form" ref="formRef" layout="vertical">
         <a-row :gutter="16">
           <a-col :span="needMx ? 12 : 24">
              <a-form-item label="返退单类型" name="type" :rules="[{ required: true, message: '请选择返退单类型' }]">

+ 1 - 1
src/DRP/HDrpManagement/transferAccounts/detail/modules/edit.vue

@@ -10,7 +10,7 @@
       :closable="false"
       @close="onClose"
     >
-      <a-form :model="form" ref="formRef" size="small" layout="vertical">
+      <a-form :model="form" ref="formRef" layout="vertical">
         <a-row :gutter="16">
           <a-col :span="24">
             <a-form-item label="企业信息" name="enterprisename" :rules="[{ required: true, message: '请选择企业信息' }]">

+ 1 - 1
src/DRP/HDrpManagement/transferAccounts/modules/add.vue

@@ -10,7 +10,7 @@
       :closable="false"
       @close="onClose"
     >
-      <a-form :model="form" ref="formRef" size="small" layout="vertical">
+      <a-form :model="form" ref="formRef" layout="vertical">
         <a-row :gutter="16">
           <a-col :span="24">
             <a-form-item label="企业信息" name="enterprisename" :rules="[{ required: true, message: '请选择企业信息' }]">

+ 4 - 2
src/DRP/SDrpManagement/productGroup/detail/index.vue

@@ -11,8 +11,10 @@
       <div class="image-panel">
         <img :src="group.item[0].attinfos[imgIndex].url" alt="">
       </div>
-      <div style="width:100px;height:100px">
-        <img class="s-image" :src="img.url" v-for="(img,index) in group.item[0].attinfos" :key="index" alt="" @click="imgIndex = index">
+      <div style="display:flex;">
+        <div style="width:100px;height:100px;margin-right:10px" v-for="(img,index) in group.item[0].attinfos" :key="index">
+          <img class="s-image" :src="img.url"  alt="" @click="imgIndex = index">
+        </div>
       </div>
     </div>
     <div style="flex:1" v-if="group.item[0]">

+ 37 - 9
src/components/detailTemplate/index.vue

@@ -13,12 +13,12 @@
             <a-space>
               <slot name="operation"></slot>
               <a-button v-if="delParam && utils.hasPermission('delete')" type="primary" :disabled="disable" @click="delData" danger>删除</a-button>
-              <a-button @click="previous">
+              <a-button v-if="router.currentRoute.value.query.listqueryid" @click="previous">
                 <template #icon>
                   <left-outlined />
                 </template>
               </a-button>
-              <a-button @click="next">
+              <a-button v-if="router.currentRoute.value.query.listqueryid" @click="next">
                 <template #icon>
                   <right-outlined />
                 </template>
@@ -52,7 +52,7 @@
   import {defineProps,ref,createVNode,computed,defineEmits,onMounted,onActivated} from 'vue'
   import { LeftOutlined,RightOutlined,ExclamationCircleOutlined,ArrowLeftOutlined} from '@ant-design/icons-vue'
   import { useRouter } from "vue-router"
-  import { Modal } from 'ant-design-vue'
+  import { Modal,message } from 'ant-design-vue'
   import { useRouteTabsStore } from '@/stores/modules/routeTabs'
   import { storeToRefs } from 'pinia'
   const rotTabs = useRouteTabsStore()
@@ -65,7 +65,6 @@
     delParam:Object,
     disable:Boolean,
     notabs:Boolean,
-    pageUp:Function
   })
   const activeKey = ref(0)
   
@@ -95,17 +94,46 @@
   const onTabChange = (key)=>{
     activeKey.value = key
   }
+  const time = ref(null)
   const previous = ()=>{
     let rowindex = Number(router.currentRoute.value.query.rowindex) - 1
-    props.pageUp(rowindex,(id)=>{
-      router.replace({path:router.currentRoute.value.path,query:{id:id,rowindex:rowindex,pageUp:1}})
-    })
+    let listqueryid = router.currentRoute.value.query.listqueryid
+    if (rowindex >= 1) {
+      if (time.value !== null) {
+        clearTimeout(time.value)
+      }
+      time.value = setTimeout(() => {
+        upPageData(rowindex,listqueryid)
+      }, 0);
+    } else {
+      message.warn('已经是第一条了!')
+    }
   }
   const next = ()=>{
     let rowindex = Number(router.currentRoute.value.query.rowindex) + 1
-    props.pageUp(rowindex,(id)=>{
-      router.replace({path:router.currentRoute.value.path,query:{id:id,rowindex:rowindex,pageUp:1}})
+    let listqueryid = router.currentRoute.value.query.listqueryid
+    if (time.value !== null) {
+      clearTimeout(time.value)
+    }
+    time.value = setTimeout(() => {
+      upPageData(rowindex,listqueryid)
+    }, 0);
+  }
+  const upPageData = async (rowindex,listqueryid)=> {
+    const res = await Api.requested({
+      "classname": "system.tools",
+      "method":"querylistdatabyrowindex",
+        "content": {
+          "rowindex": rowindex,
+          "listqueryid": listqueryid,
+          "fieldname":''
+        }
     })
+    if (res.data.data) {
+      router.replace({path:router.currentRoute.value.path,query:{id:res.data.data,rowindex:rowindex,listqueryid:listqueryid}})
+    } else {
+       message.warn('已经是最后一条了!')
+    }
   }
   onActivated (()=>{
     if(!props.tabs || props.tabs.length == 0) {

+ 3 - 5
src/components/listTemplate/index.vue

@@ -133,14 +133,12 @@
     dataSource.value = res.data
     total.value = res.total
     sort.value = res.sort
-    setTimeout(() => {
-      loading.value = false
-    }, 1000);
+    loading.value = false
   }
 
   const toDetailPage = (record)=>{
     // 跳转到详情
-    router.push({name:props.detailPage.name,query:{id:record[props.detailPage.idname],rowindex:record.rowindex}})
+    router.push({name:props.detailPage.name,query:{id:record[props.detailPage.idname],rowindex:record.rowindex,listqueryid:record.listqueryid}})
   }
   const search = (val)=>{
     props.param.content.where = Object.assign({},props.param.content.where,val)
@@ -182,7 +180,7 @@
   })
   onActivated (()=>{
     // getTableLayout()
-    props.noAutoQuery ? '' : tableData()
+    // props.noAutoQuery ? '' : tableData()
   })
   onDeactivated (()=>{
   })