codeMan 1 سال پیش
والد
کامیت
1b13ab35eb
37فایلهای تغییر یافته به همراه241 افزوده شده و 133 حذف شده
  1. 0 1
      dist/assets/404-0653601a.css
  2. BIN
      dist/assets/404-feaffb97.png
  3. BIN
      dist/assets/AlimamaShuHeiTi-Bold-43badd4d.woff2
  4. BIN
      dist/assets/AlimamaShuHeiTi-Bold-b9233bc8.woff
  5. BIN
      dist/assets/bg-4325a45f.png
  6. BIN
      dist/assets/bg-b0a8fb70.jpg
  7. 0 0
      dist/assets/index-501cf061.css
  8. 0 1
      dist/assets/index-875e5ae4.js
  9. 0 0
      dist/assets/index.esm-44936652.js
  10. 0 0
      dist/assets/vue-74beb2f3.js
  11. 0 4
      dist/assets/vue-router-d228e26b.js
  12. 0 1
      dist/assets/公司人员-126a50a2.svg
  13. 0 1
      dist/assets/经销商-b4caaafe.svg
  14. 0 1
      dist/assets/经销商员工-1e699a85.svg
  15. 0 1
      dist/vite.svg
  16. 3 1
      src/DRP/HDrpManagement/brandAndClass/detail/modules/editClass.vue
  17. 2 2
      src/DRP/HDrpManagement/dispatchBill/detail/index.vue
  18. 11 9
      src/DRP/HDrpManagement/orderManage/detail/index.vue
  19. 5 2
      src/DRP/HDrpManagement/productManage/detail/tabs/gradePrice.vue
  20. 1 1
      src/DRP/HDrpManagement/programme/index.vue
  21. 3 1
      src/DRP/HDrpManagement/promotionManage/detail/index.vue
  22. 12 12
      src/DRP/SDrpManagement/collection/index.vue
  23. 22 18
      src/DRP/SDrpManagement/order/detail/index.vue
  24. 41 16
      src/DRP/SDrpManagement/order/detail/modules/changePromotionQty.vue
  25. 22 37
      src/DRP/SDrpManagement/productGroup/detail/index.vue
  26. 3 5
      src/DRP/SDrpManagement/productGroup/index.vue
  27. 13 8
      src/DRP/SDrpManagement/salerPromotion/detail/index.vue
  28. 13 4
      src/DRP/SDrpManagement/shopCart/index.vue
  29. 0 2
      src/api/request.js
  30. 75 0
      src/class/product.js
  31. 8 0
      src/components/detailTemplate/index.vue
  32. 2 0
      src/components/listTemplate/index.vue
  33. 1 1
      src/stores/modules/auth.js
  34. 1 1
      src/stores/modules/base.js
  35. 1 1
      src/template/normalTable/index.vue
  36. 1 1
      src/template/selectProduct/index.vue
  37. 1 1
      src/utils/utils.js

+ 0 - 1
dist/assets/404-0653601a.css

@@ -1 +0,0 @@
-.noPage_container{height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:space-around}.noPage_container img{width:40%}.btn_penal{width:300px;text-align:center;margin:40px auto}.btn_penal .el-button{width:120px}

BIN
dist/assets/404-feaffb97.png


BIN
dist/assets/AlimamaShuHeiTi-Bold-43badd4d.woff2


BIN
dist/assets/AlimamaShuHeiTi-Bold-b9233bc8.woff


BIN
dist/assets/bg-4325a45f.png


BIN
dist/assets/bg-b0a8fb70.jpg


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/assets/index-501cf061.css


+ 0 - 1
dist/assets/index-875e5ae4.js

@@ -1 +0,0 @@
-import{W as a,X as t,$ as s,Z as n,Y as o,F as d,a6 as _,N as m,a7 as u,a0 as y}from"./vue-74beb2f3.js";const k={__name:"index",props:["data"],setup(l){const r=l;return(c,x)=>{const p=a("a-descriptions-item"),i=a("a-descriptions");return t(),s(i,{column:3,labelStyle:{color:"#666",width:"150px"},contentStyle:{marginRight:"20px",marginBottom:"5px",minWidth:"200px"},bordered:""},{default:n(()=>[(t(!0),o(d,null,_(r.data,e=>(t(),s(p,{key:e.index,label:e.label},{default:n(()=>[e.value=="custom"?m(c.$slots,e.label,{key:0}):(t(),o("span",{key:1,style:u(e.style?e.style():"")},y(e.value),5))]),_:2},1032,["label"]))),128))]),_:3})}}};export{k as _};

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/assets/index.esm-44936652.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/assets/vue-74beb2f3.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 4
dist/assets/vue-router-d228e26b.js


+ 0 - 1
dist/assets/公司人员-126a50a2.svg

@@ -1 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="20" height="20" viewBox="0 0 20 20"><defs><style>.a,.c{fill:#1677ff;}.a{stroke:#707070;}.b{clip-path:url(#a);}</style><clipPath id="a"><rect class="a" width="20" height="20" transform="translate(136 198)"/></clipPath></defs><g class="b" transform="translate(-136 -198)"><path class="c" d="M22.27,21.006h-.529V9.62a.817.817,0,0,0-.812-.812H16.957A.19.19,0,0,0,16.763,9V20.993H15.9V4.346a1.145,1.145,0,0,0-1.135-1.135H5.351A1.145,1.145,0,0,0,4.217,4.346v16.66h-.49a.722.722,0,1,0,0,1.444H22.282A.721.721,0,0,0,23,21.728a.732.732,0,0,0-.735-.722ZM7.866,7.814h4.4a.645.645,0,0,1,0,1.289h-4.4a.638.638,0,0,1-.645-.645A.655.655,0,0,1,7.866,7.814Zm0,3.533h4.4a.645.645,0,0,1,0,1.289h-4.4a.638.638,0,0,1-.645-.645A.647.647,0,0,1,7.866,11.348Zm0,3.559h4.4a.645.645,0,1,1,0,1.289h-4.4a.638.638,0,0,1-.645-.645A.647.647,0,0,1,7.866,14.907Z" transform="translate(132.995 195.17)"/></g></svg>

+ 0 - 1
dist/assets/经销商-b4caaafe.svg

@@ -1 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="20" height="20" viewBox="0 0 20 20"><defs><style>.a,.c{fill:#f1a300;}.a{stroke:#707070;}.b{clip-path:url(#a);}</style><clipPath id="a"><rect class="a" width="20" height="20" transform="translate(160 198)"/></clipPath></defs><g class="b" transform="translate(-160 -198)"><path class="c" d="M19.871,5H5.128a.626.626,0,0,1,0-1.251H19.871a.626.626,0,0,1,0,1.251Zm0,8a2.523,2.523,0,0,0,2.553-1.776,1.206,1.206,0,0,0,.012-.812q-.813-2-1.609-4a.285.285,0,0,0-.319-.212H4.42a.27.27,0,0,0-.3.2C3.6,7.754,3.069,9.1,2.551,10.453a.869.869,0,0,0-.044.4,2.379,2.379,0,0,0,1,1.675,2.52,2.52,0,0,0,3.906-1.373.078.078,0,0,1,.147,0,2.549,2.549,0,0,0,2.875,1.825,2.494,2.494,0,0,0,1.979-1.841.077.077,0,0,1,.147,0,2.51,2.51,0,0,0,4.836.069.077.077,0,0,1,.147,0,2.575,2.575,0,0,0,2.321,1.8l0-.011Zm-15.637,1.8v.143c0,1.676.021,3.351-.01,5.028a1.334,1.334,0,0,0,1.3,1.273c4.661-.021,9.32-.011,13.981-.011a1.233,1.233,0,0,0,.928-.355,1.2,1.2,0,0,0,.352-.923V14.813a.066.066,0,0,0-.027-.058.089.089,0,0,0-.063-.021,2.788,2.788,0,0,1-3.123-1.405.074.074,0,0,0-.134,0,2.744,2.744,0,0,1-4.85,0,.075.075,0,0,0-.134,0,2.642,2.642,0,0,1-2.436,1.458,2.6,2.6,0,0,1-2.428-1.458.075.075,0,0,0-.135,0,2.8,2.8,0,0,1-3.118,1.411.066.066,0,0,0-.069.011.068.068,0,0,0-.034.058h0Z" transform="translate(157.5 195.5)"/></g></svg>

+ 0 - 1
dist/assets/经销商员工-1e699a85.svg

@@ -1 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="20" height="20" viewBox="0 0 20 20"><defs><style>.a,.c{fill:#e55c16;}.a{stroke:#707070;}.b{clip-path:url(#a);}</style><clipPath id="a"><rect class="a" width="20" height="20" transform="translate(162 198)"/></clipPath></defs><g class="b" transform="translate(-162 -198)"><g transform="translate(157 192.167)"><path class="c" d="M12.912,12.139H8.04a.741.741,0,1,1,0-1.48h4.872a.741.741,0,1,1,0,1.48m-1.16,3.55H8.04a.741.741,0,1,1,0-1.48h3.71a.741.741,0,1,1,0,1.48m7.755-9.021H8.964A3.81,3.81,0,0,0,5,10.269v9.923A3.6,3.6,0,0,0,8.644,23.88h3.235c0-.032.008.032.012,0a6.971,6.971,0,0,1,2.923-4.752,4.376,4.376,0,0,1-.585-4.632,4.78,4.78,0,0,1,1.94-2.237,5.854,5.854,0,0,1,3.027-.793h.072l.027,0a5.2,5.2,0,0,1,2.7.863,4.809,4.809,0,0,1,1.283,1.287l.057-3.048a3.937,3.937,0,0,0-3.828-3.9"/><path class="c" d="M14,25a.805.805,0,0,1-.653-1.012A5.973,5.973,0,0,1,16.3,19.662c.357-.228.367-.293.08-.582a3.391,3.391,0,0,1-.835-3.988,3.922,3.922,0,0,1,3.85-2.313A3.722,3.722,0,0,1,22.787,15.1a3.327,3.327,0,0,1-.812,3.945c-.183.18-.242.283-.22.355s.092.125.328.277a6.035,6.035,0,0,1,2.9,4.25c.09.578-.16,1-.647,1.07Z"/></g></g></svg>

+ 0 - 1
dist/vite.svg

@@ -1 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>

+ 3 - 1
src/DRP/HDrpManagement/brandAndClass/detail/modules/editClass.vue

@@ -65,7 +65,7 @@ const onClose = () => {
 const form = ref(
 const form = ref(
   {
   {
     "itemclassid":0,
     "itemclassid":0,
-    "sa_brandid":router.currentRoute.value.query.id,
+    "sa_brandid":0,
     "parentid":props.parentid ? props.parentid:0,
     "parentid":props.parentid ? props.parentid:0,
     "itemclassnum":"",
     "itemclassnum":"",
     "itemclassname":"",
     "itemclassname":"",
@@ -77,7 +77,9 @@ const form = ref(
 )
 )
 const formRef = ref()
 const formRef = ref()
 const submit = async ()=>{
 const submit = async ()=>{
+  // console.log(router.currentRoute.value.query.id,form.value)
   try {
   try {
+    form.value.sa_brandid = router.currentRoute.value.query.id
     form.value.ishide = form.value.ishide?1:0
     form.value.ishide = form.value.ishide?1:0
     const values = await formRef.value.validateFields();
     const values = await formRef.value.validateFields();
     const res = await Api.requested({
     const res = await Api.requested({

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

@@ -30,7 +30,7 @@
             </template>
             </template>
             <template v-if="data.column.dataIndex == 'batchno' && utils.hasPermission('billMxEdit')">
             <template v-if="data.column.dataIndex == 'batchno' && utils.hasPermission('billMxEdit')">
               <a-select v-if="data.record.batchcontrol == 1" style="width:100%;" v-model:value="data.record.batchno" :disabled="utils.isDisabled(billData.STATUS,['提交','审核','关闭','复核'],isEditDisabled)" @focus="dropdownVisibleChange(data.record)" @change="inputChange(data.record)">
               <a-select v-if="data.record.batchcontrol == 1" style="width:100%;" v-model:value="data.record.batchno" :disabled="utils.isDisabled(billData.STATUS,['提交','审核','关闭','复核'],isEditDisabled)" @focus="dropdownVisibleChange(data.record)" @change="inputChange(data.record)">
-                <a-select-option v-for="item in options" :key="item.fbatchno" :value="item.fbatchno">{{item.fbatchno + ':数量' + item.fqty}}</a-select-option>
+                <a-select-option v-for="item in data.record.options" :key="item.fbatchno" :value="item.fbatchno">{{item.fbatchno + ':数量' + item.fqty}}</a-select-option>
               </a-select>
               </a-select>
               <span v-else>{{data.record.batchno}}</span>
               <span v-else>{{data.record.batchno}}</span>
             </template>
             </template>
@@ -336,7 +336,7 @@ const dropdownVisibleChange = async (row)=>{
         "qty":row.qty
         "qty":row.qty
       }
       }
     })
     })
-    options.value = res.data
+    row.options = res.data
 }
 }
 onMounted (()=>{
 onMounted (()=>{
   mianData()
   mianData()

+ 11 - 9
src/DRP/HDrpManagement/orderManage/detail/index.vue

@@ -195,6 +195,7 @@ import saleOutBill from './tabs/saleOutBill.vue'
 import logisticsOrder from './tabs/logisticsOrder.vue'
 import logisticsOrder from './tabs/logisticsOrder.vue'
 import IncomeMx from './tabs/income.vue'
 import IncomeMx from './tabs/income.vue'
 import print from '@/components/print/index.vue'
 import print from '@/components/print/index.vue'
+import Product from '@/class/Product.js'
 
 
 import { Modal } from 'ant-design-vue'
 import { Modal } from 'ant-design-vue'
 import { message } from 'ant-design-vue';
 import { message } from 'ant-design-vue';
@@ -369,15 +370,14 @@ const updateProd = async (data,msg,fn) =>{
   })
   })
  
  
 }
 }
-const validInput = async (record,min,max,type)=>{
-  if (!record[type]) return
-  if (record[type] > max) {
-    record[type] = max
-  } else if (record[type] < min) {
-    record[type] = min
-  } else {
-    record[type] = record[type]
-  }
+const validInput = (record)=>{
+  const pd = new Product(record)
+  let lengthValidData = {min: record.lengthmin, max:record.lengthmax,}
+  let widthValData = {min: record.widthmin, max: record.widthmax,}
+  if (!pd.checkDimension({width:widthValData,length:lengthValidData}, record)) {
+    return false
+  } 
+  return true
 }
 }
 const addProductToBody = async (val) =>{
 const addProductToBody = async (val) =>{
   let param = {
   let param = {
@@ -714,6 +714,8 @@ const openCustom = (data)=>{
   prod.value = data
   prod.value = data
 }
 }
 const handleOk = ()=>{
 const handleOk = ()=>{
+  if (!validInput(prod.value.record)) 
+    return false
   prod.value.record.isselect = true
   prod.value.record.isselect = true
   prodlist.value.data.some((item)=>{
   prodlist.value.data.some((item)=>{
     if (item.itemid == prod.value.itemid) {
     if (item.itemid == prod.value.itemid) {

+ 5 - 2
src/DRP/HDrpManagement/productManage/detail/tabs/gradePrice.vue

@@ -1,9 +1,9 @@
 <template>
 <template>
   <div>
   <div>
     <a-row :gutter="16">
     <a-row :gutter="16">
-      <a-col :span="4" v-for="item in gradeList" :key="item.index">
+      <a-col :span="4" v-for="(item,index) in utils.FormLayout('gradePrice',gradeList)" :key="item.index">
         <a-card :body-style="{padding:'20px'}">
         <a-card :body-style="{padding:'20px'}">
-          <a-statistic :title="item.pricegrade +'级价格' " :value="item.price" :value-style="{ color: '#d9363e' }" />
+          <a-statistic :title="item.label" :value="gradeList[index] ? gradeList[index].price : 0" :value-style="{ color: '#d9363e' }" />
         </a-card>
         </a-card>
       </a-col>
       </a-col>
     </a-row>
     </a-row>
@@ -13,6 +13,8 @@
 <script setup>
 <script setup>
 import {ref,defineProps,onMounted} from 'vue'
 import {ref,defineProps,onMounted} from 'vue'
 import Api from '@/api/api'
 import Api from '@/api/api'
+import utils from '@/utils/utils'
+
 const props = defineProps({
 const props = defineProps({
   id:String
   id:String
 })
 })
@@ -30,6 +32,7 @@ const getGradePrice = async ()=>{
     }
     }
   })
   })
   gradeList.value = res.data
   gradeList.value = res.data
+  console.log(utils.FormLayout('gradePrice',gradeList.value))
 }
 }
 onMounted (()=>{
 onMounted (()=>{
   getGradePrice()
   getGradePrice()

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

@@ -321,10 +321,10 @@ const importSuccess = async (res)=>{
     failedData.value = rs.msg
     failedData.value = rs.msg
   } else {
   } else {
     utils.message(rs,'导入成功',()=>{
     utils.message(rs,'导入成功',()=>{
-      prodTable.value.listData()
       failedData.value = null
       failedData.value = null
       mianData()
       mianData()
     })
     })
+    prodTable.value.listData()
   }
   }
 }
 }
 onMounted(()=>{
 onMounted(()=>{

+ 3 - 1
src/DRP/HDrpManagement/promotionManage/detail/index.vue

@@ -18,7 +18,6 @@
           <template v-if="utils.hasPermission('productTabEdit')" #operation>
           <template v-if="utils.hasPermission('productTabEdit')" #operation>
             <a-space class="mt-10">
             <a-space class="mt-10">
               <select-product :disabled="utils.isDisabled(promotionData.status,['审核','发布','关闭'])" :param="selectParam" :tableid="utils.TBLayoutID('addProducrt')" :columns="utils.TBLayout('addProducrt')" @onSelectChange="onSelectChange"></select-product>
               <select-product :disabled="utils.isDisabled(promotionData.status,['审核','发布','关闭'])" :param="selectParam" :tableid="utils.TBLayoutID('addProducrt')" :columns="utils.TBLayout('addProducrt')" @onSelectChange="onSelectChange"></select-product>
-              <tableImport :disabled="utils.isDisabled(promotionData.status,['审核','发布','关闭'])" :bindData="{ownerid:router.currentRoute.value.query.id,ownertable:'sa_promotionid',usetype:'default'}" :failedData="failedData" :modeParam="{id:20230510153404,content:{}}" @uploadSuccess="importSuccess"></tableImport>
               <a-button :disabled="utils.isDisabled(promotionData.status,['审核','发布','关闭'],(selection.length == 0))" type="primary" @click="delerProds">删除商品</a-button>
               <a-button :disabled="utils.isDisabled(promotionData.status,['审核','发布','关闭'],(selection.length == 0))" type="primary" @click="delerProds">删除商品</a-button>
               <promotion-discount :data="selection" :id="router.currentRoute.value.query.id"  :disabled="utils.isDisabled(promotionData.status,['审核','发布','关闭'])" @onSuccess="onSuccess"></promotion-discount>
               <promotion-discount :data="selection" :id="router.currentRoute.value.query.id"  :disabled="utils.isDisabled(promotionData.status,['审核','发布','关闭'])" @onSuccess="onSuccess"></promotion-discount>
               <a-dropdown v-if="promotionData.type == '套餐活动'" :trigger="['click']">
               <a-dropdown v-if="promotionData.type == '套餐活动'" :trigger="['click']">
@@ -36,6 +35,9 @@
               </a-dropdown>
               </a-dropdown>
             </a-space>
             </a-space>
           </template>
           </template>
+          <template #more>
+            <tableImport v-if="utils.hasPermission('importExcel')" type="icon" :disabled="utils.isDisabled(promotionData.status,['审核','发布','关闭'])" :bindData="{ownerid:router.currentRoute.value.query.id,ownertable:'sa_promotionid',usetype:'default'}" :failedData="failedData" :modeParam="{id:20230510153404,content:{}}" @uploadSuccess="importSuccess"></tableImport>
+          </template>
           <template #tb_cell="{data}">
           <template #tb_cell="{data}">
             <div v-if="data.column.dataIndex == 'orderaddqty' && utils.hasPermission('productTabEdit')">
             <div v-if="data.column.dataIndex == 'orderaddqty' && utils.hasPermission('productTabEdit')">
               <a-input-number :disabled="utils.isDisabled(promotionData.status,['审核','发布','关闭'],(promotionData.type == '套餐活动'))" v-model:value="data.record.orderaddqty" type="number" min="1" @change="data.record.isChange = true" @blur="updateProd([data.record])"></a-input-number>
               <a-input-number :disabled="utils.isDisabled(promotionData.status,['审核','发布','关闭'],(promotionData.type == '套餐活动'))" v-model:value="data.record.orderaddqty" type="number" min="1" @change="data.record.isChange = true" @blur="updateProd([data.record])"></a-input-number>

+ 12 - 12
src/DRP/SDrpManagement/collection/index.vue

@@ -105,6 +105,8 @@
   import { useRouter } from "vue-router"
   import { useRouter } from "vue-router"
   import { useBaseStore } from '@/stores/modules/base'
   import { useBaseStore } from '@/stores/modules/base'
   import { storeToRefs } from 'pinia'
   import { storeToRefs } from 'pinia'
+  import Product from '@/class/Product'
+
   const base = useBaseStore()
   const base = useBaseStore()
   const router = useRouter()
   const router = useRouter()
   const prod = ref()
   const prod = ref()
@@ -264,14 +266,14 @@
   //   })
   //   })
   //   return bool
   //   return bool
   // }
   // }
-  const validInput = async (record,min,max,type)=>{
-    if (record[type] > max) {
-      record[type] = max
-    } else if (record[type] < min) {
-      record[type] = min
-    } else {
-      record[type] = record[type]
-    }
+  const validInput = (record,min,max,type)=>{
+    const pd = new Product(record)
+    let lengthValidData = {min: record.lengthmin, max:record.lengthmax,}
+    let widthValData = {min: record.widthmin, max: record.widthmax,}
+    if (!pd.checkDimension({width:widthValData,length:lengthValidData}, record)) {
+      return false
+    } 
+    return true
   }
   }
   const saveData = (data,type)=>{
   const saveData = (data,type)=>{
     if(time.value !== null){
     if(time.value !== null){
@@ -317,10 +319,8 @@
     prodData.value = data
     prodData.value = data
   }
   }
   const handleOk = ()=>{
   const handleOk = ()=>{
-    if (prodData.value.record.cheekschemeid > 0 && !prodData.record.customcheek) return message.warning('请填写完整信息')
-    if (prodData.value.record.colorschemeid > 0 && !prodData.record.customcolors) return message.warning('请填写完整信息')
-    if (prodData.value.record.materialschemeid > 0 && !prodData.record.custommaterial) return message.warning('请填写完整信息')
-    if ((prodData.value.record.spec == '自定义' || prodData.value.record.spec == 'custom') && (!prodData.value.record.length || !prodData.value.record.width)) return message.warning('请填写完整信息')
+    if (!validInput(prodData.value.record)) 
+      return false
     prodData.value.record.isselect = true
     prodData.value.record.isselect = true
     prod.value.data.some((item)=>{
     prod.value.data.some((item)=>{
       if (item.itemid == prodData.value.itemid) {
       if (item.itemid == prodData.value.itemid) {

+ 22 - 18
src/DRP/SDrpManagement/order/detail/index.vue

@@ -162,6 +162,7 @@
                 ref="selectProd"
                 ref="selectProd"
                 v-if="utils.hasPermission('orderMxedit')"
                 v-if="utils.hasPermission('orderMxedit')"
                 :pagination="isPromotion"
                 :pagination="isPromotion"
+                :rowKey="orderData.type == '促销订单' ? 'sa_promotion_itemsid':'itemid'"
                 :isSelect="isPromotion"
                 :isSelect="isPromotion"
                 :selectAll="isPromotion"
                 :selectAll="isPromotion"
                 :columns="utils.TBLayout('orderAddTable')"
                 :columns="utils.TBLayout('orderAddTable')"
@@ -240,7 +241,7 @@
             <template
             <template
               v-if="
               v-if="
                 data.column.dataIndex === 'qty' &&
                 data.column.dataIndex === 'qty' &&
-                utils.hasPermission('orderMxedit')
+                utils.hasPermission('orderMxedit') && !isPromotion
               "
               "
             >
             >
               <a-input-number
               <a-input-number
@@ -250,7 +251,8 @@
                   utils.isDisabled(
                   utils.isDisabled(
                     orderData.status,
                     orderData.status,
                     ['提交', '审核', '关闭'],
                     ['提交', '审核', '关闭'],
-                    isEditDisabled
+                    isEditDisabled,
+                    
                   )
                   )
                 "
                 "
                 @change="inputChange(data.record, 'qty')"
                 @change="inputChange(data.record, 'qty')"
@@ -488,6 +490,7 @@ import { Modal } from "ant-design-vue";
 import { message } from "ant-design-vue";
 import { message } from "ant-design-vue";
 import { ExclamationCircleOutlined } from "@ant-design/icons-vue";
 import { ExclamationCircleOutlined } from "@ant-design/icons-vue";
 import { useRouter } from "vue-router";
 import { useRouter } from "vue-router";
+import Product from '@/class/Product'
 import {
 import {
   onMounted,
   onMounted,
   ref,
   ref,
@@ -650,15 +653,14 @@ const updateProd = async (data, msg, fn) => {
     fn ? fn() : "";
     fn ? fn() : "";
   });
   });
 };
 };
-const validInput = async (record, min, max, type) => {
-  if (!record[type]) return;
-  if (record[type] > max) {
-    record[type] = max;
-  } else if (record[type] < min) {
-    record[type] = min;
-  } else {
-    record[type] = record[type];
-  }
+const validInput = (record) => {
+  const pd = new Product(record)
+  let lengthValidData = {min: record.lengthmin, max:record.lengthmax,}
+  let widthValData = {min: record.widthmin, max: record.widthmax,}
+  if (!pd.checkDimension({width:widthValData,length:lengthValidData}, record)) {
+    return false
+  } 
+  return true
 };
 };
 const qtyModal = ref(false)
 const qtyModal = ref(false)
 const promotionQty  = ref(null)
 const promotionQty  = ref(null)
@@ -688,12 +690,7 @@ const addProductToBody = async (val) => {
       items: val,
       items: val,
     },
     },
   };
   };
-  base.addRepeatProd(param,()=>{
-    if (isPromotion.value) {
-      message.error('该套餐已存在,请勿重复添加!')
-      return false
-    }
-  }).then((res) => {
+  base.addRepeatProd(param).then((res) => {
     const allowAdd = (e) => {
     const allowAdd = (e) => {
       if (e.iscustomsize == 1) {
       if (e.iscustomsize == 1) {
         if (!e.length || !e.width) {
         if (!e.length || !e.width) {
@@ -779,7 +776,7 @@ const deleteProd = () => {
     title: "删除商品",
     title: "删除商品",
     icon: createVNode(ExclamationCircleOutlined),
     icon: createVNode(ExclamationCircleOutlined),
     content:
     content:
-      orderData.value.promitionType == "套餐活动"
+    isPromotion.value
         ? `该商品为套餐商品,删除后该套餐下所有商品都会被删除,确认删除吗?`
         ? `该商品为套餐商品,删除后该套餐下所有商品都会被删除,确认删除吗?`
         : `当前选中${selectProductList.value.length}个商品,删除${selectProductList.value.length}个商品!`,
         : `当前选中${selectProductList.value.length}个商品,删除${selectProductList.value.length}个商品!`,
     okText: "确认",
     okText: "确认",
@@ -917,6 +914,8 @@ const openCustom = (data) => {
   prod.value = data;
   prod.value = data;
 };
 };
 const handleOk = () => {
 const handleOk = () => {
+  if (!validInput(prod.value.record)) 
+    return false
   prod.value.record.isselect = true;
   prod.value.record.isselect = true;
   prodlist.value.data.some((item) => {
   prodlist.value.data.some((item) => {
     if (item.itemid == prod.value.itemid) {
     if (item.itemid == prod.value.itemid) {
@@ -1001,8 +1000,13 @@ const getPackagetype = async (fn) => {
       return e;
       return e;
     }
     }
   })[0].subvalues;
   })[0].subvalues;
+
+  const set2 = new Set(orderData.value.packagetypemxrows.map(e=>e.packagetypemx));  
+  packagetypeOptions.value = packagetypeOptions.value.filter(x => !set2.has(x)); 
+  console.log(packagetypeOptions.value,set2)
   listParam.value.content.pageSize = 100;
   listParam.value.content.pageSize = 100;
   listParam.value.content.where.packagetypemx = packagetypeOptions.value[0];
   listParam.value.content.where.packagetypemx = packagetypeOptions.value[0];
+
 };
 };
 const tabChange = (val) => {
 const tabChange = (val) => {
   activeKey.value = val;
   activeKey.value = val;

+ 41 - 16
src/DRP/SDrpManagement/order/detail/modules/changePromotionQty.vue

@@ -1,18 +1,27 @@
 <template>
 <template>
 <div class=''>
 <div class=''>
-  <a-dropdown>
-    <template #overlay>
-      <a-menu @click="handleMenuClick">
-        <a-menu-item v-for="(item,index) in orderData.packagetypemxrows" :key="index">
-          {{item.packagetypemx}}
-        </a-menu-item>
-      </a-menu>
+  <a-button @click="openDrawer" :disabled="utils.isDisabled(
+    orderData.status,
+    ['提交', '审核', '关闭'])">
+      调整套数
+  </a-button>
+  <a-drawer :width="900" title="套餐调整" :open="open" @close="onClose">
+    <template #extra>
+      <a-button style="margin-right: 8px" @click="open = false">取消</a-button>
+      <a-button type="primary" @click="qtyModal = true">调整</a-button>
     </template>
     </template>
-    <a-button>
-      修改套餐套数
-      <DownOutlined />
-    </a-button>
-  </a-dropdown>
+    <a-tabs
+      v-model:activeKey="activeKey"
+      @change="tabChange"
+    >
+      <a-tab-pane
+        v-for="(item, index) in orderData.packagetypemxrows"
+        :key="index"
+        :tab="item.packagetypemx"
+      ></a-tab-pane>
+    </a-tabs>
+    <a-table :dataSource="listData" :columns="utils.TBLayout('orderAddTable')" size="small"/>
+  </a-drawer>
   <a-modal v-model:open="qtyModal" :width="400" title="修改购买套数" ok-text="确认" cancel-text="取消" @ok="promotionToBillBody">
   <a-modal v-model:open="qtyModal" :width="400" title="修改购买套数" ok-text="确认" cancel-text="取消" @ok="promotionToBillBody">
     <a-input placeholder="输入购买套数" v-model:value="promotionQty" type="number" style="margin:20px 0;" @change="promotionQtyChange"></a-input>
     <a-input placeholder="输入购买套数" v-model:value="promotionQty" type="number" style="margin:20px 0;" @change="promotionQtyChange"></a-input>
   </a-modal>
   </a-modal>
@@ -23,6 +32,7 @@ import Api from '@/api/api'
 import { ref,defineProps,defineEmits } from 'vue'
 import { ref,defineProps,defineEmits } from 'vue'
 import { message } from 'ant-design-vue'
 import { message } from 'ant-design-vue'
 import { useRoute } from 'vue-router'
 import { useRoute } from 'vue-router'
+import utils from '@/utils/utils'
 const router = useRoute()
 const router = useRoute()
 const props = defineProps({
 const props = defineProps({
   orderData:{
   orderData:{
@@ -31,10 +41,13 @@ const props = defineProps({
   }
   }
 })
 })
 const emit = defineEmits(['changePromotionQty'])
 const emit = defineEmits(['changePromotionQty'])
+const activeKey = ref(0)
+const open = ref(false)
 const qtyModal = ref(false)
 const qtyModal = ref(false)
 const promotionQty = ref(0)
 const promotionQty = ref(0)
 const listData = ref([])
 const listData = ref([])
-const handleMenuClick = async (val)=>{
+const questData = async ()=>{
+  listData.value = []
   const hide = message.loading('套餐数据查询中...')
   const hide = message.loading('套餐数据查询中...')
   const param = {
   const param = {
     "id":"20221109093902",
     "id":"20221109093902",
@@ -44,15 +57,19 @@ const handleMenuClick = async (val)=>{
       "total":null,
       "total":null,
       "sa_orderid":router.query.id,
       "sa_orderid":router.query.id,
       "pageSize":9999,
       "pageSize":9999,
-      "where":{"packagetypemx":props.orderData.packagetypemxrows[val.key].packagetypemx}
+      "where":{"packagetypemx":props.orderData.packagetypemxrows[activeKey.value].packagetypemx}
     }
     }
   }
   }
   const res = await Api.requested(param)
   const res = await Api.requested(param)
   listData.value = res.data
   listData.value = res.data
-  qtyModal.value = true
-  promotionQty.value = props.orderData.packagetypemxrows[val.key].packagetypeqty
+  promotionQty.value = props.orderData.packagetypemxrows[activeKey.value].packagetypeqty
   setTimeout(hide, 0);
   setTimeout(hide, 0);
 }
 }
+const openDrawer = (val)=>{
+  questData()
+  open.value = true
+  
+}
 const promotionToBillBody = ()=>{
 const promotionToBillBody = ()=>{
   listData.value = listData.value.map(e=>{
   listData.value = listData.value.map(e=>{
     e.qty = e.orderminqty * promotionQty.value
     e.qty = e.orderminqty * promotionQty.value
@@ -62,6 +79,14 @@ const promotionToBillBody = ()=>{
     qtyModal.value = false
     qtyModal.value = false
   })
   })
 }
 }
+const tabChange = (val)=>{
+  activeKey.value = val;
+  questData()
+}
+const onClose = ()=>{
+  open.value = false
+  activeKey.value = 0
+}
 </script>
 </script>
 <style scoped >
 <style scoped >
 
 

+ 22 - 37
src/DRP/SDrpManagement/productGroup/detail/index.vue

@@ -39,26 +39,26 @@
       <div v-if="group.materialRows.length > 0" class="mt-30 input-number-panel">
       <div v-if="group.materialRows.length > 0" class="mt-30 input-number-panel">
         <p class="label"><span class="mr-10">{{siteInfo.siteid == 'DLB'?'选项':'基材'}}</span></p>
         <p class="label"><span class="mr-10">{{siteInfo.siteid == 'DLB'?'选项':'基材'}}</span></p>
         <div>
         <div>
-          <a-button class="mr-10 mt-10" v-for="(item,index) in group.materialRows" :key="index" :disabled="!item.flag" :type="data.material == item.parm?'primary':'default'" @click="customClick('material',item.parm)">{{item.parm}}</a-button>
+          <a-button class="mr-10 mt-10" v-for="(item,index) in group.materialRows" :key="index" :disabled="!item.flag || load" :type="data.material == item.parm?'primary':'default'" @click="customClick('material',item.parm)">{{item.parm}}</a-button>
         </div>
         </div>
       </div>
       </div>
       <div v-if="group.colorRows.length > 0" class="mt-30 input-number-panel">
       <div v-if="group.colorRows.length > 0" class="mt-30 input-number-panel">
         <p class="label"><span class="mr-10">颜色</span></p>
         <p class="label"><span class="mr-10">颜色</span></p>
         <div>
         <div>
-          <a-button class="mr-10 mt-10" v-for="(item,index) in group.colorRows" :key="index" :disabled="!item.flag" :type="data.color == item.parm?'primary':'default'" @click="customClick('color',item.parm)">{{item.parm}}</a-button>
+          <a-button class="mr-10 mt-10" v-for="(item,index) in group.colorRows" :key="index" :disabled="!item.flag || load" :type="data.color == item.parm?'primary':'default'" @click="customClick('color',item.parm)">{{item.parm}}</a-button>
         </div>
         </div>
       </div>
       </div>
      
      
       <div v-if="group.cheekRows.length > 0" class="mt-30 input-number-panel">
       <div v-if="group.cheekRows.length > 0" class="mt-30 input-number-panel">
         <p class="label"><span class="mr-10">{{siteInfo.siteid == 'DLB'?'工艺':'边框'}}</span></p>
         <p class="label"><span class="mr-10">{{siteInfo.siteid == 'DLB'?'工艺':'边框'}}</span></p>
         <div>
         <div>
-          <a-button class="mr-10" v-for="(item,index) in group.cheekRows" :key="index" :disabled="!item.flag" :type="data.cheek == item.parm?'primary':'default'" @click="customClick('cheek',item.parm)">{{item.parm}}</a-button>
+          <a-button class="mr-10" v-for="(item,index) in group.cheekRows" :key="index" :disabled="!item.flag || load" :type="data.cheek == item.parm?'primary':'default'" @click="customClick('cheek',item.parm)">{{item.parm}}</a-button>
         </div>
         </div>
       </div>
       </div>
       <div v-if="group.specRows.length > 0" class="mt-30 input-number-panel">
       <div v-if="group.specRows.length > 0" class="mt-30 input-number-panel">
         <p style="flex:1 0 auto;max-width:38px;margin-bottom:10px" class="label"><span class="mr-10">尺寸</span></p>
         <p style="flex:1 0 auto;max-width:38px;margin-bottom:10px" class="label"><span class="mr-10">尺寸</span></p>
         <div>
         <div>
-          <a-button  class="mr-10 mt-10" v-for="(item,index) in group.specRows" :key="index" :disabled="!item.flag" :type="data.spec == item.parm?'primary':'default'" @click="customClick('spec',item.parm)">{{item.parm == 'custom'?'自定义':item.parm}}</a-button>
+          <a-button  class="mr-10 mt-10" v-for="(item,index) in group.specRows" :key="index" :disabled="!item.flag || load" :type="data.spec == item.parm?'primary':'default'" @click="customClick('spec',item.parm)">{{item.parm == 'custom'?'自定义':item.parm}}</a-button>
         </div>
         </div>
       </div>
       </div>
       
       
@@ -69,7 +69,7 @@
           <p class="label"><span class="mr-10">长度</span></p>
           <p class="label"><span class="mr-10">长度</span></p>
           <div>
           <div>
             <div v-if="lengthscheme.type == '自定义'">
             <div v-if="lengthscheme.type == '自定义'">
-              <a-input-number style="width: 150px;" :controls="false" :step="1" v-model:value="schemeData.length" @blur="onInputChange('length')" placeholder="输入区间内长度"/><span style="color:#666">&emsp;输入范围:{{lengthscheme.min}}mm - {{lengthscheme.max}}mm,不保留小数</span>
+              <a-input-number style="width: 150px;" :controls="false" :step="1" v-model:value="schemeData.length" @blur="inputValid('length')" placeholder="输入区间内长度"/><span style="color:#666">&emsp;输入范围:{{lengthscheme.min}}mm - {{lengthscheme.max}}mm,不保留小数</span>
             </div>
             </div>
             <div>
             <div>
               <a-button class="mr-10 mt-10" v-for="(item,index) in lengthscheme.rowsdetail" :key="index" :disabled="schemeData.length != item.num && (schemeData.length != null && schemeData.length != '')" :type="schemeData.length == item.num?'primary':'default'" @click="customClick2('length',item.num)">{{item.num}}</a-button>
               <a-button class="mr-10 mt-10" v-for="(item,index) in lengthscheme.rowsdetail" :key="index" :disabled="schemeData.length != item.num && (schemeData.length != null && schemeData.length != '')" :type="schemeData.length == item.num?'primary':'default'" @click="customClick2('length',item.num)">{{item.num}}</a-button>
@@ -80,7 +80,7 @@
           <p class="label"><span class="mr-10">宽度</span></p>
           <p class="label"><span class="mr-10">宽度</span></p>
           <div>
           <div>
             <div v-if="widthscheme.type == '自定义'">
             <div v-if="widthscheme.type == '自定义'">
-             <a-input-number style="width: 150px;" :controls="false" :step="1" v-model:value="schemeData.width" @blur="onInputChange('width')" placeholder="输入区间内宽度"/><span style="color:#666">&emsp;输入范围:{{widthscheme.min}}mm - {{widthscheme.max}}mm,不保留小数</span>
+             <a-input-number style="width: 150px;" :controls="false" :step="1" v-model:value="schemeData.width" @blur="inputValid('width')" placeholder="输入区间内宽度"/><span style="color:#666">&emsp;输入范围:{{widthscheme.min}}mm - {{widthscheme.max}}mm,不保留小数</span>
             </div>
             </div>
             <div v-else>
             <div v-else>
               <a-button class="mr-10 mt-10"  v-for="(item,index) in widthscheme.rowsdetail" :key="index" :disabled="schemeData.width != item.num && (schemeData.width != null && schemeData.width != '')" :type="schemeData.width == item.num?'primary':'default'" @click="customClick2('width',item.num)">{{item.num}}</a-button>
               <a-button class="mr-10 mt-10"  v-for="(item,index) in widthscheme.rowsdetail" :key="index" :disabled="schemeData.width != item.num && (schemeData.width != null && schemeData.width != '')" :type="schemeData.width == item.num?'primary':'default'" @click="customClick2('width',item.num)">{{item.num}}</a-button>
@@ -131,6 +131,8 @@
   import utils from '@/utils/utils'
   import utils from '@/utils/utils'
   import { useBaseStore } from '@/stores/modules/base'
   import { useBaseStore } from '@/stores/modules/base'
   import { storeToRefs } from 'pinia'
   import { storeToRefs } from 'pinia'
+  import Product from '@/class/product'
+
   const base = useBaseStore()
   const base = useBaseStore()
   let { siteInfo } = storeToRefs(base)
   let { siteInfo } = storeToRefs(base)
 
 
@@ -148,13 +150,17 @@
   const imgIndex = ref(0)
   const imgIndex = ref(0)
   const custom = ref([])
   const custom = ref([])
   const qty = ref(0)
   const qty = ref(0)
+  const load = ref(false)
   const groupDetail = async (init)=>{
   const groupDetail = async (init)=>{
+    load.value = true
     data.value.sa_itemgroupid = router.currentRoute.value.query.id
     data.value.sa_itemgroupid = router.currentRoute.value.query.id
     const res = await Api.requested({
     const res = await Api.requested({
       "id": "20221223165503",
       "id": "20221223165503",
       "content": data.value
       "content": data.value
     })
     })
+    load.value = false
     group.value = res.data
     group.value = res.data
+
     group.value.specRows = group.value.specRows.reverse()
     group.value.specRows = group.value.specRows.reverse()
     if(group.value.specRows.filter(item => item.parm != '自定义').every(item => !item.flag) && group.value.item[0].iscustomsize) data.value.spec = '自定义'
     if(group.value.specRows.filter(item => item.parm != '自定义').every(item => !item.flag) && group.value.item[0].iscustomsize) data.value.spec = '自定义'
     qty.value = res.data.item[0].orderminqty
     qty.value = res.data.item[0].orderminqty
@@ -175,7 +181,6 @@
     if (res.data.rows.length == 1) {
     if (res.data.rows.length == 1) {
       // 遍历对象
       // 遍历对象
       for (let key in res.data.rows[0]) {
       for (let key in res.data.rows[0]) {
-        console.log(key,'--')
         data.value[key] = res.data.rows[0][key]
         data.value[key] = res.data.rows[0][key]
       }
       }
     }
     }
@@ -291,22 +296,6 @@
     schemeInfo.value = res.data
     schemeInfo.value = res.data
     return res.data
     return res.data
   }
   }
-  const onInputChange = ((type)=>{
-    console.log(schemeData.value)
-    function hasDecimal(num) {
-      const str = num.toString();
-      const decimalIndex = str.indexOf('.');
-      return decimalIndex !== -1;
-    }
-    if (schemeData.value.width && hasDecimal(schemeData.value.width)){
-      message.warning('请输入整数')
-      schemeData.value.width = widthscheme.value.min
-    }
-    if (schemeData.value.length && hasDecimal(schemeData.value.length)) {
-      message.warning('请输入整数')
-      schemeData.value.length = lengthscheme.value.min
-    }
-  })
   const getCustomsizeData =  async ()=>{
   const getCustomsizeData =  async ()=>{
     let lengthschemeid = group.value.item[0].lengthschemeid
     let lengthschemeid = group.value.item[0].lengthschemeid
     let widthschemeid = group.value.item[0].widthschemeid
     let widthschemeid = group.value.item[0].widthschemeid
@@ -325,23 +314,19 @@
         }
         }
       }
       }
   }
   }
-  const validCustomSize = ()=>{
-    let lengthValidData = {min:lengthscheme.value.min,max:lengthscheme.value.max}
-    let widthValData = {min:widthscheme.value.min,max:widthscheme.value.max}
-    if (!schemeData.value.width || !schemeData.value.length) {
-      message.error({content:'定制选项不能为空!',key:1})
-      return false
-    } else if ((schemeData.value.width < widthValData.min || schemeData.value.width > widthValData.max) && widthscheme.value.type == '自定义') {
-      message.error({content:'自定义宽度超出可选范围!',key:1})
-      return false
-    } else if ((schemeData.value.length < lengthValidData.min || schemeData.value.length > lengthValidData.max) && lengthscheme.value.type == '自定义') {
-      message.error({content:'自定义长度超出可选范围!',key:1})
+  const inputValid = (type)=>{
+    validCustomSize()
+  }
+  const validCustomSize = (type)=>{
+    const pd = new Product(group.value.item[0])
+    let lengthValidData = {min: lengthscheme.value.min, max:lengthscheme.value.max,}
+    let widthValData = {min: widthscheme.value.min, max: widthscheme.value.max,}
+    if (!pd.checkDimension({width:widthValData,length:lengthValidData}, schemeData.value)) {
       return false
       return false
-    } else {
-      return true
     }
     }
-    
+    return true
   }
   }
+    
   const onCollection = (data)=>{
   const onCollection = (data)=>{
     let collection = async (bool)=>{
     let collection = async (bool)=>{
       const res = await Api.requested({
       const res = await Api.requested({

+ 3 - 5
src/DRP/SDrpManagement/productGroup/index.vue

@@ -50,7 +50,7 @@
                   {{index === item.itemclass.length -1 ?cls.itemclassfullname:cls.itemclassfullname + ','}}
                   {{index === item.itemclass.length -1 ?cls.itemclassfullname:cls.itemclassfullname + ','}}
                 </span>
                 </span>
               </p>
               </p>
-              <div class="flex">
+\              <div class="flex">
                 <p class="price" v-if="item.minprice == item.maxprice">
                 <p class="price" v-if="item.minprice == item.maxprice">
                   价格:<span style="color:red;font-size:16px"><small>¥</small>{{utils.formatAmount(item.maxprice,{name:'hideFields',key:'maxprice'})}}</span>
                   价格:<span style="color:red;font-size:16px"><small>¥</small>{{utils.formatAmount(item.maxprice,{name:'hideFields',key:'maxprice'})}}</span>
                 </p>
                 </p>
@@ -59,6 +59,7 @@
                   <ShoppingCartOutlined @click.stop="addCart(item)"/>
                   <ShoppingCartOutlined @click.stop="addCart(item)"/>
                 </div>
                 </div>
               </div>
               </div>
+              
             </div>
             </div>
 
 
           </div>
           </div>
@@ -86,12 +87,9 @@
   import Api from '@/api/api'
   import Api from '@/api/api'
   import utils from '@/utils/utils'
   import utils from '@/utils/utils'
   import FieldAndClass from './modules/fieldAndClass.vue'
   import FieldAndClass from './modules/fieldAndClass.vue'
-  import {ref,onMounted,getCurrentInstance} from 'vue'
+  import {ref,onMounted} from 'vue'
   import { ShoppingCartOutlined,StarOutlined,StarFilled} from '@ant-design/icons-vue';
   import { ShoppingCartOutlined,StarOutlined,StarFilled} from '@ant-design/icons-vue';
-  import { message } from 'ant-design-vue';
   import { useBaseStore } from '@/stores/modules/base'
   import { useBaseStore } from '@/stores/modules/base'
-  import { storeToRefs } from 'pinia'
-
   import { useRouter } from "vue-router"
   import { useRouter } from "vue-router"
   const base = useBaseStore()
   const base = useBaseStore()
   const router = useRouter()
   const router = useRouter()

+ 13 - 8
src/DRP/SDrpManagement/salerPromotion/detail/index.vue

@@ -279,6 +279,8 @@ import { ExclamationCircleOutlined } from "@ant-design/icons-vue";
 import { Modal } from "ant-design-vue";
 import { Modal } from "ant-design-vue";
 import { message } from "ant-design-vue";
 import { message } from "ant-design-vue";
 import { useRouter } from "vue-router";
 import { useRouter } from "vue-router";
+import Product from '@/class/Product'
+
 const activeKey = ref(0)
 const activeKey = ref(0)
 const router = useRouter();
 const router = useRouter();
 const prod = ref();
 const prod = ref();
@@ -361,14 +363,15 @@ const onQtyChange = (val) => {
       val.qty = res;
       val.qty = res;
     });
     });
 };
 };
-const validInput = async (record, min, max, type) => {
-  if (record[type] > max) {
-    record[type] = max;
-  } else if (record[type] < min) {
-    record[type] = min;
-  } else {
-    record[type] = record[type];
-  }
+const validInput = (record, min, max, type) => {
+  console.log(record)
+  const pd = new Product(record)
+  let lengthValidData = {min: record.lengthmin, max:record.lengthmax,}
+  let widthValData = {min: record.widthmin, max: record.widthmax,}
+  if (!pd.checkDimension({width:widthValData,length:lengthValidData}, record)) {
+    return false
+  } 
+  return true
 };
 };
 const checkIscustomsize = (val) => {
 const checkIscustomsize = (val) => {
   let bool = true;
   let bool = true;
@@ -541,6 +544,8 @@ const openCustom = (data) => {
   prodData.value = data;
   prodData.value = data;
 };
 };
 const handleOk = () => {
 const handleOk = () => {
+  if (!validInput(prodData.value.record)) 
+    return false
   prodData.value.record.isselect = true;
   prodData.value.record.isselect = true;
   prod.value.data.some((item) => {
   prod.value.data.some((item) => {
     if (item.itemid == prodData.value.itemid) {
     if (item.itemid == prodData.value.itemid) {

+ 13 - 4
src/DRP/SDrpManagement/shopCart/index.vue

@@ -90,6 +90,8 @@
   import { useRouter } from "vue-router"
   import { useRouter } from "vue-router"
   import { useBaseStore } from '@/stores/modules/base'
   import { useBaseStore } from '@/stores/modules/base'
   import { storeToRefs } from 'pinia'
   import { storeToRefs } from 'pinia'
+  import Product from '@/class/Product'
+
   const base = useBaseStore()
   const base = useBaseStore()
   const router = useRouter()
   const router = useRouter()
   const prod = ref()
   const prod = ref()
@@ -250,6 +252,15 @@
     })
     })
     utils.message(res,'修改成功')
     utils.message(res,'修改成功')
   }
   }
+  const validInput = (record, min, max, type) => {
+    const pd = new Product(record)
+    let lengthValidData = {min: record.lengthmin, max:record.lengthmax,}
+    let widthValData = {min: record.widthmin, max: record.widthmax,}
+    if (!pd.checkDimension({width:widthValData,length:lengthValidData}, record)) {
+      return false
+    } 
+    return true
+  };
   const open = ref(false)
   const open = ref(false)
   const prodData = ref({})
   const prodData = ref({})
   const openCustom = (data)=>{
   const openCustom = (data)=>{
@@ -257,10 +268,8 @@
     prodData.value = data
     prodData.value = data
   }
   }
   const handleOk = ()=>{
   const handleOk = ()=>{
-    if (prodData.value.record.cheekschemeid > 0 && !prodData.record.customcheek) return message.warning('请填写完整信息')
-    if (prodData.value.record.colorschemeid > 0 && !prodData.record.customcolors) return message.warning('请填写完整信息')
-    if (prodData.value.record.materialschemeid > 0 && !prodData.record.custommaterial) return message.warning('请填写完整信息')
-    if ((prodData.value.record.spec == '自定义' || prodData.value.record.spec == 'custom') && (!prodData.value.record.length || !prodData.value.record.width)) return message.warning('请填写完整信息')
+    if (!validInput(prodData.value.record)) 
+      return false
     prodData.value.record.isselect = true
     prodData.value.record.isselect = true
     prod.value.data.some((item)=>{
     prod.value.data.some((item)=>{
       if (item.itemid == prodData.value.itemid) {
       if (item.itemid == prodData.value.itemid) {

+ 0 - 2
src/api/request.js

@@ -4,8 +4,6 @@ import axios from 'axios'
 import { useAuthStore } from '@/stores/modules/auth'
 import { useAuthStore } from '@/stores/modules/auth'
 import { useBaseStore } from '@/stores/modules/base'
 import { useBaseStore } from '@/stores/modules/base'
 import { message } from 'ant-design-vue';
 import { message } from 'ant-design-vue';
-import NProgress, { set } from 'nprogress' // nprogress插件 
-import 'nprogress/nprogress.css' // nprogress样式
 import utils from '@/utils/utils'
 import utils from '@/utils/utils'
 import router from '@/router'
 import router from '@/router'
 let CancelToken = axios.CancelToken;
 let CancelToken = axios.CancelToken;

+ 75 - 0
src/class/product.js

@@ -0,0 +1,75 @@
+import { message } from 'ant-design-vue';
+class Product {  
+  constructor(attributes = {}) {  
+    // 初始化一个空对象来存储商品的所有属性  
+    this.attributes = {};  
+  
+    // 如果传入了属性,则将它们添加到attributes对象中  
+    Object.assign(this.attributes, attributes);  
+  }  
+  
+  // 定义一个方法来获取商品属性  
+  getAttribute(key) {  
+    return this.attributes[key];  
+  }  
+  
+  // 定义一个方法来设置商品属性  
+  setAttribute(key, value) {  
+    this.attributes[key] = value;  
+  }  
+  
+  // 定义一个方法来列出所有商品属性  
+  listAttributes() {  
+    return Object.keys(this.attributes).map(key => `${key}: ${this.attributes[key]}`).join(', ');  
+  }  
+
+  // 验证商品订制属性是否符合规则
+  checkDimension (dimensionData, schemeData) { 
+    console.log(schemeData)
+    const requiredProperties = ['length', 'width'];  
+    for (const prop of requiredProperties) {  
+      if ((schemeData[prop] < dimensionData[prop].min || schemeData[prop] > dimensionData[prop].max)) {  
+        message.error({ content: `自定义${prop == 'length'?'长度':'宽度'}超出可选范围!`, key: 1 });  
+        return false;  
+      }
+      if (!schemeData[prop]) {  
+        message.error({ content: `${prop == 'length'?'长度':'宽度'}定制选项不能为空!`, key: 1 });  
+        return false;  
+      } 
+      if (!this.hasDecimal(schemeData[prop],prop)) {  
+        return false;  
+      }
+    }
+    return true
+  }
+
+  hasDecimal(num,prop) {
+    const str = num.toString();
+    const decimalIndex = str.indexOf('.');
+    if (decimalIndex !== -1) {
+      message.error(`${prop == 'length'?'长度':'宽度'}请输入整数`)
+      return false
+    }
+    return true
+  }
+}  
+  
+// const product1 = new Product({  
+//   name: 'Apple iPhone 12',  
+//   price: 999.99,  
+//   category: 'Smartphone'  
+// });  
+  
+// console.log(product1.getAttribute('name')); // 输出: Apple iPhone 12  
+// console.log(product1.listAttributes()); // 输出: name: Apple iPhone 12, price: 999.99, category: Smartphone  
+  
+// // 动态添加属性  
+// product1.setAttribute('stock', 100);  
+// console.log(product1.listAttributes()); // 输出: name: Apple iPhone 12, price: 999.99, category: Smartphone, stock: 100  
+  
+// // 创建另一个商品实例,不传入任何属性  
+// const product2 = new Product();  
+// product2.setAttribute('name', 'Samsung Galaxy S21');  
+// product2.setAttribute('price', 899.99);  
+// console.log(product2.listAttributes()); // 输出: name: Samsung Galaxy S21, price: 899.99
+export default Product

+ 8 - 0
src/components/detailTemplate/index.vue

@@ -137,9 +137,13 @@ import {
 import { useRouter } from "vue-router";
 import { useRouter } from "vue-router";
 import { Modal, message } from "ant-design-vue";
 import { Modal, message } from "ant-design-vue";
 import { useRouteTabsStore } from "@/stores/modules/routeTabs";
 import { useRouteTabsStore } from "@/stores/modules/routeTabs";
+import { useAuthStore } from '@/stores/modules/auth'
+
 const rotTabs = useRouteTabsStore();
 const rotTabs = useRouteTabsStore();
 const router = useRouter();
 const router = useRouter();
+const store = useAuthStore()
 const props = defineProps({
 const props = defineProps({
+  
   headData: Array,
   headData: Array,
   tabs: Array,
   tabs: Array,
   ownertable: String,
   ownertable: String,
@@ -237,6 +241,10 @@ const upPageData = async (forward, listqueryid) => {
         fieldName: router.currentRoute.value.query.fieldName,
         fieldName: router.currentRoute.value.query.fieldName,
       },
       },
     });
     });
+    // const param = store.getQueryParams()
+    // store.setQueryParams(param)
+
+    // param.content.pageNumber = res.data.pageNumber
   } else {
   } else {
     message.warn("已经是最后一条了!");
     message.warn("已经是最后一条了!");
   }
   }

+ 2 - 0
src/components/listTemplate/index.vue

@@ -149,6 +149,8 @@
     sort.value = res.sort
     sort.value = res.sort
     loading.value = false
     loading.value = false
     listqueryid.value = res.listqueryid
     listqueryid.value = res.listqueryid
+
+    // store.getQueryParams() !== null ? '' : store.setQueryParams(props.param)
   }
   }
 
 
   const toDetailPage = (record)=>{
   const toDetailPage = (record)=>{

+ 1 - 1
src/stores/modules/auth.js

@@ -27,7 +27,7 @@ export const useAuthStore = defineStore('auth', {
     strategies: [
     strategies: [
       {
       {
         storage: localStorage,
         storage: localStorage,
-        paths: ['system', 'mods','app','accountList','nowAccount','actSystem','current','tableConfigs','hiddenSensitiveFields','qrCordBaseUrl']
+        paths: ['system', 'mods','app','accountList','nowAccount','actSystem','current','tableConfigs','hiddenSensitiveFields','qrCordBaseUrl','fieldsParam']
       }
       }
     ]
     ]
   },
   },

+ 1 - 1
src/stores/modules/base.js

@@ -177,7 +177,7 @@ export const useBaseStore = defineStore('base', {
             okText:'确认添加',
             okText:'确认添加',
             content: `${res.data.items.map(e=>e.itemname).join(',')}已存在,是否继续添加?`,
             content: `${res.data.items.map(e=>e.itemname).join(',')}已存在,是否继续添加?`,
             onOk() {
             onOk() {
-              callback ? callback():resolve()
+              resolve()
             },
             },
             onCancel() {
             onCancel() {
               console.log('Cancel');
               console.log('Cancel');

+ 1 - 1
src/template/normalTable/index.vue

@@ -5,7 +5,7 @@
       <div>
       <div>
         <slot name="operation"></slot>
         <slot name="operation"></slot>
       </div>
       </div>
-      <a-space size="middle" class="mt-10">
+      <a-space size="middle" class="fl-r mt-10">
         <slot name="more"></slot>
         <slot name="more"></slot>
         <setting-columns ref="setColumns" :columns="columns" :param="props.param" :tableName="props.tableName"></setting-columns>
         <setting-columns ref="setColumns" :columns="columns" :param="props.param" :tableName="props.tableName"></setting-columns>
         <fullScreen :domId="'normalTable' + app.name"></fullScreen>
         <fullScreen :domId="'normalTable' + app.name"></fullScreen>

+ 1 - 1
src/template/selectProduct/index.vue

@@ -169,7 +169,7 @@
     }
     }
 
 
     // 开启列表数据静态过滤
     // 开启列表数据静态过滤
-    fn?.props.needQuestSearch?.fn()
+    props.needQuestSearch ? fn ? fn() : '' : ''
   }
   }
   const onSelect = async (record, selected, selectedRows, nativeEvent)=>{
   const onSelect = async (record, selected, selectedRows, nativeEvent)=>{
     if (!selected) {
     if (!selected) {

+ 1 - 1
src/utils/utils.js

@@ -115,7 +115,7 @@ export default {
                 let func = new Function('data', 'that', e.script);
                 let func = new Function('data', 'that', e.script);
                 return func(data, that); // 输出1
                 return func(data, that); // 输出1
               } catch (error) {
               } catch (error) {
-                console.log(error)
+                // console.log(error)
               }
               }
 
 
             } : null,
             } : null,

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است