codeMan 2 лет назад
Родитель
Сommit
9398487e1d

+ 47 - 0
src/DRP/HDrpManagement/calcMethod/detail/index.vue

@@ -0,0 +1,47 @@
+<template>
+  <div>
+    <detail-template :headData="mainAreaData" :title="mainData.functionname" :tabs="['商品']" :hideBorder="false" ownertable="sys_datafunction">
+      <template #operation>
+        <Edit :data="mainData.param" @onSuccess="queryMainData" :disabled="!utils.hasPermission('update')"></Edit>
+      </template>
+      <template #tab0>
+        <product></product>
+      </template>
+    </detail-template>
+  </div>
+</template>
+
+<script setup>
+import Api from '@/api/api'
+import  utils from '@/utils/utils'
+import Edit from '../modules/Edit.vue'
+import detailTemplate from '@/components/detailTemplate/index.vue'
+import product from './modules/tabs/product/product.vue'
+import {ref,onMounted,createVNode} from 'vue'
+import { useRouter } from "vue-router"
+const router = useRouter()
+const remitmx = ref()
+const mainData = ref({})
+const mainAreaData = ref([])
+const queryMainData = async () => {
+  const res = await Api.requested({
+    "id":20231212111202,
+    "content": {
+      "sys_datafunctionid": router.currentRoute.value.query.id
+    }
+  })
+  mainData.value = res.data
+  changeDataStructure(res.data)
+}
+const onSuccess = () =>{
+  queryMainData()
+}
+const  changeDataStructure = (data)=> {
+  mainAreaData.value = utils.FormLayout('detailsHead',data)
+}
+onMounted(()=>{
+  queryMainData()
+})
+</script>
+<style>
+</style>

+ 66 - 0
src/DRP/HDrpManagement/calcMethod/detail/modules/tabs/product/product.vue

@@ -0,0 +1,66 @@
+<template>
+  <SelectModel 
+    ref="product" 
+    @selectRowData="selectProject" 
+    rowKey="itemid" 
+    :param="selectPordParam" 
+    :columns="utils.TBLayout('productManageTable')" title="选择商品"
+  >
+    <template v-slot:slot1>
+      <a-button :disabled="!utils.hasPermission('productAdd')" size="middle" type="primary" style="margin-bottom: 10px;" @click="$refs.product.modeVisible=true">添加</a-button>
+    </template>
+  </SelectModel>
+
+  <normalTable :is-select="false" rowKey="sys_datafunction_bindid" size="small" ref="list" :columns="utils.TBLayout('productManageTable')" :param="{id:20231212110202,content:{sys_datafunctionid:router.currentRoute.value.query.id}}">
+    <template #tb_cell="{data}">
+      <template v-if="data.column.dataIndex === 'operation'">
+        <customBtn
+          :disabled="!utils.hasPermission('productDel')"
+          btnName="解绑"
+          idName="20231208134102"
+          keyName="sys_datafunction_bindids"
+          :id="[data.record.sys_datafunction_bindid]"
+          type="link"
+          message="确定解绑当前商品吗?"
+          @onSuccess="$refs.list.listData()"
+        />
+      </template>
+    </template>
+  </normalTable>
+</template>
+
+<script setup>
+import Api from '@/api/api'
+import {ref,createVNode } from 'vue'
+import utils from '@/utils/utils'
+import normalTable from '@/template/normalTable/index.vue'
+import SelectModel from '@/components/selectModel/index2.vue'
+import customBtn from '@/components/customHandleBtn/index.vue'
+import { useRouter } from "vue-router"
+import { Modal } from 'ant-design-vue'
+import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
+const router = useRouter()
+let list = ref()
+let selectPordParam = ref({id:20220923140602,content:{'pageNumber':1,'pageSize':20,'where':{'condition':'','tradefield':'','status':'审核','isonsale':'1','isonsalebutnotingroup':''}}})
+
+const selectProject = async (data) => {
+  let arr = data.map(item => {
+    return {
+      ownertable:'plm_item',
+      ownerid:item.itemid
+    }
+  })
+  const res = await Api.post({
+    id:20231208134002,
+    content:{
+      sys_datafunctionid:router.currentRoute.value.query.id,
+      items: arr
+    }
+  })
+  utils.message(res,'操作成功',()=>{
+    list.value.listData()
+  })
+}
+</script>
+<style>
+</style>

+ 37 - 0
src/DRP/HDrpManagement/calcMethod/index.vue

@@ -0,0 +1,37 @@
+<template>
+    <listTemp ref="list" :param="param" :tableName="'methodListTable'" keyRouteName="functionname" :detailPage="{name:'methodDetail',idname:'sys_datafunctionid'}">
+      <template #operation>
+        订单明细
+      </template>
+      <template #tb_cell="{data}">
+        <template v-if="data.column.dataIndex === 'amount'">
+          <span>{{utils.formatAmount(data.record.amount)}}</span>
+        </template>
+      </template>
+    </listTemp>
+</template>
+<script setup>
+  import utils from '@/utils/utils'
+  import Api from '@/api/api'
+  import listTemp from '@/components/listTemplate/index.vue';
+  import { ref } from 'vue'
+  import { useRouter } from "vue-router";
+  import { onMounted } from "vue";
+  const router = useRouter()
+  const list = ref()
+  let searchType = ref([
+  ])
+  let param = ref({
+    "content": {
+    "nocache": true,
+    "pageNumber": 1,
+    "pageSize": 20
+    },
+    "id": 20231208133902,
+  })
+  const onSuccess = ()=>{
+    list.value.tableData()
+  }
+</script>
+<style>
+</style>

+ 182 - 0
src/DRP/HDrpManagement/calcMethod/modules/Edit.vue

@@ -0,0 +1,182 @@
+<template>
+  <a-button type="primary" @click="showDrawer" :disabled="disabled">编辑</a-button>
+  <a-drawer
+    v-model:open="visible"
+    class="custom-class"
+    title="编辑费用订制方案"
+    placement="right"
+    width="600"
+    :closable="false"
+    @close="onClose">
+    <a-form ref="formRef" :model="form" layout="vertical">
+      <a-row :gutter="16">
+        <template v-for="(item) in data">
+          <a-col :span="12" v-if="item.param == 'apportiontype'">
+            <a-form-item :label="item.paramname" :name="item.paramname" :rules="[{ required: true, message:item }]">
+              <a-select v-model:value="form[item.paramname]">
+                <a-select-option v-for="(cash,cashi) in cashbillrectype" :key="cashi" :value="cash.value">{{ cash.remarks }}</a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12" v-if="item.param == 'value'">
+            <a-form-item :label="item.paramname" :name="item.paramname" :rules="[{ required: true,validator: checkNumber,message:item }]">
+              <a-input-group>
+                <a-input v-model:value="form[item.paramname]" style="width: 60%" />
+                <a-select v-model:value="form['满足条件']" style="width:100px">
+                  <a-select-option v-for="(cond,condi) in condition" :key="condi" :value="cond.value">{{ cond.remarks }}</a-select-option>
+                  <a-select-option value="Jiangsu">Jiangsu</a-select-option>
+                </a-select>
+              </a-input-group>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12" v-if="item.param == 'itemfield'">
+            <a-form-item :label="item.paramname" :name="item.paramname" :rules="[{ required: true, message:item }]">
+              <a-select v-model:value="form[item.paramname]">
+                <a-select-option v-for="(field,fieldi) in itemfield" :key="fieldi" :value="field.value">{{ field.remarks }}</a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12" v-if="item.param == 'unitfee'">
+            <a-form-item :label="item.paramname" :name="item.paramname" :rules="[{ required: true,validator: checkNumber,message:item }]">
+              <a-input v-model:value="form[item.paramname]" style="width: 100%" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="12" v-if="item.param == 'isreturn'">
+            <a-form-item :label="item.paramname" :name="item.paramname" :rules="[{ required: true,message:item }]">
+              <a-radio-group v-model:value="form[item.paramname]">
+                <a-radio value="1">是</a-radio>
+                <a-radio value="0">否</a-radio>
+              </a-radio-group>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12" v-if="item.param == 'ispay'">
+            <a-form-item :label="item.paramname" :name="item.paramname" :rules="[{ required: true,message:item }]">
+              <a-radio-group v-model:value="form[item.paramname]">
+                <a-radio value="1">是</a-radio>
+                <a-radio value="0">否</a-radio>
+              </a-radio-group>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12" v-if="item.param == 'isaccumulation'">
+            <a-form-item :label="item.paramname" :name="item.paramname" :rules="[{ required: true,message:item }]">
+              <a-radio-group v-model:value="form[item.paramname]">
+                <a-radio value="1">是</a-radio>
+                <a-radio value="0">否</a-radio>
+              </a-radio-group>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12" v-if="item.param == 'iscombination'">
+            <a-form-item :label="item.paramname" :name="item.paramname" :rules="[{ required: true,message:item }]">
+              <a-radio-group v-model:value="form[item.paramname]">
+                <a-radio value="1">是</a-radio>
+                <a-radio value="0">否</a-radio>
+              </a-radio-group>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12" v-if="item.param == 'ordertype'">
+            <a-form-item :label="item.paramname" :name="item.paramname" :rules="[{ required: true, message:item }]">
+              <a-select v-model:value="form[item.paramname]">
+                <a-select-option v-for="(order,orderi) in ordertype" :key="orderi" :value="order.value">{{ order.value }}</a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+        </template>
+        
+        
+      </a-row>
+    </a-form>
+    <template #extra>
+      <a-space>
+        <a-button @click="onClose">关闭</a-button>
+        <a-button type="primary" @click="submit">保存</a-button>
+      </a-space>
+    </template>
+  </a-drawer>
+</template>
+
+<script setup>
+import {ref,defineEmits,defineProps,defineExpose, onMounted} from 'vue'
+import {PlusOutlined} from '@ant-design/icons-vue';
+import Api from '@/api/api'
+import utils from '@/utils/utils'
+const emit = defineEmits(['onSuccess'])
+const props = defineProps(['data','disabled'])
+const visible = ref(false)
+let form = ref({})
+const showDrawer = ()=>{
+  props.data.forEach(item => {
+    form.value[item.paramname] = item.value
+  })
+  console.log(form.value,'参数',props.data);
+  visible.value = true
+}
+const onClose = () => {
+  visible.value = false;
+  formRef.value.resetFields();
+};
+const formRef = ref()
+
+const checkNumber = async (_rule, value) => {
+  if (value === '' || value == null) {
+    return Promise.reject('该输入项不能为空');
+  } else if(value <=0){
+    return Promise.reject('输的的值必须大于0');
+  } else {
+    return Promise.resolve();
+  }
+}
+
+const submit = async ()=>{
+  try {
+    const values = await formRef.value.validateFields();
+    let items = []
+    Object.keys(form.value).forEach((item,index) => {
+      items[index] = {
+        sys_datafunction_paramsid:props.data.filter(item2 => item2.paramname == item)[0].sys_datafunction_paramsid,
+        value:form.value[item],
+      }
+    })
+    const res = await Api.requested({
+      "content": {
+        "items": items
+      },
+      "id": 20231211141802,
+    })
+    utils.message(res,'操作成功',()=>{
+      emit('onSuccess')
+      visible.value = false
+    })
+  } catch (errorInfo) {
+    console.log('Failed:', errorInfo);
+  }
+}
+
+let cashbillrectype = ref('')
+let itemfield = ref('')
+let condition = ref('')
+let ordertype = ref('')
+
+onMounted(async () => {
+  const res = await Api.optionstype('apportiontype')
+  cashbillrectype.value = res.data
+  console.log(cashbillrectype.value,'分摊方式');
+
+  const res1 = await Api.optionstype('itemfield')
+  itemfield.value = res1.data
+  console.log(itemfield.value,'计算依据');
+
+  const res2 = await Api.optionstype('condition')
+  condition.value = res2.data
+  console.log(condition.value,'满足条件');
+  
+  const res3 = await Api.optionstype('ordertype')
+  ordertype.value = res3.data
+  console.log(ordertype.value,'订单类型');
+})
+
+defineExpose({
+  visible
+})
+</script>
+<style>
+</style>

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

@@ -31,7 +31,7 @@
   let dataSource = ref([])
   let searchType = ref([
     {label:'状态',key:'status',type:'select',dataSource:[{remarks:'新建',value:'新建'},{remarks:'审核',value:'审核'}]},
-    {label:'时间范围',key:'dateRange',type:'datepickerRange',objKeys:['begindate','enddate']},
+    {label:'单据日期',key:'dateRange',type:'datepickerRange',objKeys:['begindate','enddate']},
     {label:'归属日期',key:'dateRange2',type:'datepickerRange',objKeys:['beginperiod','endperiod']},
     {label:'经销商信息',key:'agentinfo',type:'input'},
     {label:'搜索',key:'condition',type:'input'},

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

@@ -34,7 +34,7 @@
   let dataSource = ref([])
   let searchType = ref([
     {label:'状态',key:'status',type:'select',dataSource:[{remarks:'新建',value:'新建'},{remarks:'审核',value:'审核'}]},
-    {label:'时间范围',key:'dateRange',type:'datepickerRange',objKeys:['begindate','enddate']},
+    {label:'单据日期',key:'dateRange',type:'datepickerRange',objKeys:['begindate','enddate']},
     {label:'经销商信息',key:'agentinfo',type:'input'},
     {label:'搜索',key:'condition',type:'input'},
   ])

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

@@ -32,7 +32,7 @@
   let columns = ref([])
   let dataSource = ref([])
   let searchType = ref([
-    {label:'时间范围',key:'dateRange',type:'datepickerRange',objKeys:['begindate','enddate']},
+    {label:'单据日期',key:'dateRange',type:'datepickerRange',objKeys:['begindate','enddate']},
     {label:'状态',key:'status',type:'select',dataSource:[{remarks:'新建',value:'新建'},{remarks:'复核',value:'复核'},{remarks:'关闭',value:'关闭'},{remarks:'手工关闭',value:'手工关闭'}]},
     {label:'经销商',key:'agentinfo',type:'input'},
     {label:'搜索',key:'condition',type:'input'},

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

@@ -34,7 +34,7 @@
   let columns = ref([])
   let dataSource = ref([])
   let searchType = ref([
-    {label:'时间范围',key:'dateRange',type:'datepickerRange',objKeys:['begindate','enddate']},
+    {label:'单据日期',key:'dateRange',type:'datepickerRange',objKeys:['begindate','enddate']},
     {label:'状态',key:'status',type:'select',dataSource:[{remarks:'复核',value:'复核'},{remarks:'关闭',value:'关闭'},{remarks:'手工关闭',value:'手工关闭'}]},
     {label:'已审未发',key:'isnotsent',type:'select',dataSource:[{remarks:'是',value:1},{remarks:'否',value:''}]},
     {label:'经销商信息',key:'agentinfo',type:'input'},

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

@@ -37,7 +37,7 @@
                 <template #enterButton>
                   <a-button>
                     <template #icon>
-                      <select-enterprise :columns="columns" :param="{id:20221121135804,content:{pageNumber:1,pageSize:20,where:{condition:'', status: ''}}}" @onSelect="onLogisticsSelect"></select-enterprise>
+                      <select-enterprise title="选择物流公司" :columns="columns" :param="{id:20221121135804,content:{pageNumber:1,pageSize:20,where:{condition:'', status: ''}}}" @onSelect="onLogisticsSelect"></select-enterprise>
                     </template>
                   </a-button>
                 </template>

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

@@ -24,7 +24,7 @@
   let columns = ref([])
   let dataSource = ref([])
   let searchType = ref([
-    {label:'时间范围',key:'dateRange',type:'datepickerRange',objKeys:['begindate','enddate']},
+    {label:'单据日期',key:'dateRange',type:'datepickerRange',objKeys:['begindate','enddate']},
     {label:'状态',key:'status',type:'select',dataSource:[{remarks:'新建',value:'新建'},{remarks:'结算',value:'结算'},{remarks:'审核',value:'审核'}]},
     {label:'搜索',key:'condition',type:'input'},
   ])

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

@@ -34,7 +34,7 @@
   let columns = ref([])
   let dataSource = ref([])
   let searchType = ref([
-    {label:'时间范围',key:'dateRange',type:'datepickerRange',objKeys:['begindate','enddate']},
+    {label:'单据日期',key:'dateRange',type:'datepickerRange',objKeys:['begindate','enddate']},
     {label:'审核日期',key:'dateRange1',type:'datepickerRange',objKeys:['begindate2','enddate2']},
     {label:'状态',key:'status',type:'select',dataSource:[{remarks:'审核',value:'审核'},{remarks:'关闭',value:'关闭'},{remarks:'手工关闭',value:'手工关闭'}]},
     {label:'查看未发',key:'isuncheckout',type:'select',dataSource:[{remarks:'是',value:'1'},{remarks:'否',value:'0'}]},

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

@@ -26,7 +26,7 @@
   let columns = ref([])
   let dataSource = ref([])
   let searchType = ref([
-    {label:'时间范围',key:'dateRange',type:'datepickerRange',objKeys:['begindate','enddate']},
+    {label:'单据日期',key:'dateRange',type:'datepickerRange',objKeys:['begindate','enddate']},
     {label:'状态',key:'status',type:'select',dataSource:[{remarks:'新建',value:'新建'},{remarks:'结算',value:'结算'},{remarks:'审核',value:'审核'}]},
     {label:'搜索',key:'condition',type:'input'},
   ])

+ 1 - 1
src/DRP/SDrpManagement/remitvoucher/index.vue

@@ -29,7 +29,7 @@
   let dataSource = ref([])
   let searchType = ref([
     {label:'状态',key:'status',type:'select',dataSource:[{remarks:'新建',value:'新建'},{remarks:'提交',value:'提交'},{remarks:'审核',value:'审核'}]},
-    {label:'时间范围',key:'dateRange',type:'datepickerRange',objKeys:['begindate','enddate']},
+    {label:'单据日期',key:'dateRange',type:'datepickerRange',objKeys:['begindate','enddate']},
     {label:'搜索',key:'condition',type:'input'},
   ])
   let param = ref({

+ 54 - 0
src/components/customHandleBtn/index.vue

@@ -0,0 +1,54 @@
+<template>
+  <a-button :type="type ? type :'primary'" @click="onClick" :size="size || 'small'" :disabled="disabled">{{ btnName }}</a-button>
+</template>
+
+<script setup>
+import {ref, defineProps, defineEmits} from 'vue'
+import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
+import Api from '@/api/api'
+import utils from '@/utils/utils'
+import {Modal} from 'ant-design-vue'
+let emit = defineEmits(['onSuccess'])
+let props = defineProps({
+  type: String,
+  btnName: String,
+  message: String,
+  idName: String,
+  keyName: String,
+  id:[String,Number],
+  paramData: {
+    type: Array,
+    default () {
+      return []
+    }
+  },
+  size: String,
+  disabled: Boolean
+})
+
+let onClick = () => {
+  Modal.confirm({
+    title:props.message || '确定操作当前数据吗?',
+    okText:'确认',
+    async onOk() {
+      let param = {
+        content: {}
+      }
+      param.id = props.idName
+      param.content[props.keyName] = props.id
+      props.paramData.forEach(item => {
+        param.content[item.key] = item.value
+      })
+      let res = await Api.requested(param)
+      utils.message(res,'操作成功',() => {
+        emit('onSuccess',res.data)
+      })
+    },
+    onCancel() {},
+  })
+}
+</script>
+
+<style scoped>
+
+</style>

+ 87 - 0
src/components/selectModel/index.vue

@@ -0,0 +1,87 @@
+<template>
+  <a-modal
+    v-model:visible="modeVisible"
+    class="custom-class"
+    :title="title || '标题'"
+    placement="right"
+    :width="wdith || '1200px'"
+    :closable="false"
+    @close="closeFun"
+    @ok="submit">
+    <a-input style="margin-bottom: 10px;width: 150px;" v-model:value="condition" @keyup.enter="search"  placeholder="请输入搜索内容" autocomplete="off"></a-input>
+    <normalTable v-bind="$attrs" ref="list" size="small" @listData="listData">
+      <template #tb_cell="{data}">
+        <div v-if="custom">
+          <slot name="custom" :data="data"></slot>
+        </div>
+        <div v-else>
+          <template v-if="data.column.dataIndex === 'operation'">
+            <slot name="handleBtn"></slot>
+          </template>
+          <template v-else>
+            {{ data.record[data.column.dataIndex] }}
+          </template>
+        </div>
+        
+      </template>
+    </normalTable>
+  </a-modal>
+  <slot name="slot1"></slot>
+</template>
+<script setup>
+import normalTable from '@/template/normalTable/index.vue'
+import {ref, defineProps, defineEmits,watch, nextTick} from 'vue'
+import Api from '@/api/api'
+import utils from '@/utils/utils'
+
+import {message} from 'ant-design-vue' 
+
+let emit = defineEmits(['selectRowData','close'])
+let props = defineProps({
+  title:String,
+  wdith:String,
+  custom: {
+    type:Boolean,
+    default:() => false
+  },
+})
+let condition = ref('')
+let list = ref()
+let modeVisible = ref(false)
+
+let submit = () => {
+  if (!list.value.tableRecord.length) return message.warning('请选择数据')
+  modeVisible.value = false
+  emit('selectRowData',list.value.tableRecord)
+}
+watch(() => modeVisible.value,(val,preval) => {
+  if (!val) list.value.reloadSelect()
+})
+
+let closeFun = () => {
+  emit('close')
+}
+
+let search = () => {
+  list.value.emitParam((param) => {
+    param.content.where.condition = condition.value
+    param.content.pageNumber = 1
+
+    list.value.listData()
+  })
+}
+
+let refreshTable = () => {
+  list.value.listData()
+}
+
+defineExpose({
+  modeVisible,
+  refreshTable,
+  list
+})
+</script>
+
+<style scoped>
+
+</style>

+ 100 - 0
src/components/selectModel/index2.vue

@@ -0,0 +1,100 @@
+<template>
+  <a-drawer
+    ref="drawer"
+    v-model:visible="modeVisible"
+    class="custom-class"
+    :title="title || '标题'"
+    placement="right"
+    :width="wdith || '1200px'"
+    :closable="false"
+    @close="closeFun">
+    <div style="margin-bottom: 10px" class="inline-16">
+      <a-button type="primary" @click="submit">提交</a-button>
+      <a-input style="width: 150px;margin-left: 10px;" v-model:value="condition" @keyup.enter="search"  placeholder="请输入搜索内容" autocomplete="off"></a-input>
+    </div>
+    <normalTable :scroll-y="height" v-bind="$attrs" ref="list" size="small" @listData="listData">
+      <template #tb_cell="{data}">
+        <div v-if="custom">
+          <slot name="custom" :data="data"></slot>
+        </div>
+        <div v-else>
+          <template v-if="data.column.dataIndex === 'operation'">
+            <slot name="handleBtn"></slot>
+          </template>
+          <template v-else>
+            {{ data.record[data.column.dataIndex] }}
+          </template>
+        </div>
+        
+      </template>
+    </normalTable>
+  </a-drawer>
+  <slot name="slot1"></slot>
+</template>
+<script setup>
+import normalTable from '@/template/normalTable/index.vue'
+import {ref, defineProps, defineEmits,watch, nextTick, onMounted, computed} from 'vue'
+import Api from '@/api/api'
+import utils from '@/utils/utils'
+
+import {message} from 'ant-design-vue' 
+
+let emit = defineEmits(['selectRowData','close'])
+let props = defineProps({
+  title:String,
+  wdith:String,
+  custom: {
+    type:Boolean,
+    default:() => false
+  },
+})
+let condition = ref('')
+let list = ref()
+let modeVisible = ref(false)
+let drawer = ref()
+let height = ref('')
+
+let submit = () => {
+  if (!list.value.tableRecord.length) return message.warning('请选择数据')
+  modeVisible.value = false
+  emit('selectRowData',list.value.tableRecord)
+}
+watch(() => modeVisible.value,(val,preval) => {
+  if (!val) list.value.reloadSelect()
+})
+
+let closeFun = () => {
+  emit('close')
+}
+
+let refreshTable = () => {
+  list.value.listData()
+}
+
+let search = () => {
+  list.value.emitParam((param) => {
+    param.content.pageNumber = 1
+    param.content.where.condition = condition.value
+    param.content.pageNumber = 1
+
+    list.value.listData()
+  })
+}
+
+onMounted(() => {
+  setTimeout(() => {
+    let h = document.getElementsByClassName('ant-drawer-body')[0].offsetHeight
+    height.value =  h - 190
+  },200)
+})
+
+defineExpose({
+  modeVisible,
+  refreshTable,
+  list
+})
+</script>
+
+<style scoped>
+
+</style>

+ 20 - 0
src/router/HDrpManagement.js

@@ -571,5 +571,25 @@ const HDrpManagement = [
     },
     component: () => import(/* webpackChunkName: "about" */ '@/DRP/HDrpManagement/customerGoals/detail/index.vue')
   },
+  {
+    path: '/calcMethod',
+    name: 'calcMethod',
+    meta: {
+      title: '定制方案管理',
+      name: 'calcMethod',
+      keepAlive:true
+    },
+    component: () => import(/* webpackChunkName: "about" */ '@/DRP/HDrpManagement/calcMethod/index.vue')
+  },
+  {
+    path: '/methodDetail',
+    name: 'methodDetail',
+    meta: {
+      title: '定制方案管理详情',
+      name: 'calcMethod',
+      keepAlive:true
+    },
+    component: () => import(/* webpackChunkName: "about" */ '@/DRP/HDrpManagement/calcMethod/detail/index.vue')
+  }
 ];
 export default HDrpManagement;

+ 12 - 3
src/template/normalTable/index.vue

@@ -13,7 +13,7 @@
     <a-table
       :loading="loading"
       class="ant-table-striped ant-table-small"
-      :row-selection="{type:props.filterMultiple?'radio':'checkbox',columnWidth:'10px', selectedRowKeys: selectedRowKeys,onSelectAll:onSelectAll, onChange: onSelectChange,fixed:true,onSelect:onSelect ,hideSelectAll:false,preserveSelectedRowKeys:false}"
+      :row-selection="isSelect ? {type:props.filterMultiple?'radio':'checkbox',columnWidth:'10px', selectedRowKeys: selectedRowKeys,onSelectAll:onSelectAll, onChange: onSelectChange,fixed:true,onSelect:onSelect ,hideSelectAll:false,preserveSelectedRowKeys:false} : null"
       :rowKey="rowKey"
       :keep-selection="true"
       :columns="columns"
@@ -83,7 +83,11 @@
     rowKey:String,
     filterMultiple:Boolean,
     noQuery:false,
-    tableRowStyle:Function
+    tableRowStyle:Function,
+    isSelect: {
+      type:Boolean,
+      default:() => true
+    }
   })
   const formatter = (_record, index) => {
     if (props.tableRowStyle) 
@@ -158,6 +162,9 @@
     listData()
     
   }
+  const emitParam = (callback) => {
+    callback(props.param)
+  }
   onMounted(()=>{
     props.tableName ? columns.value = colStore.loadTableConfig(props.tableName) : columns.value = props.columns
     props.noQuery ? '' : listData()
@@ -176,7 +183,9 @@
   defineExpose({
     data,
     listData,
-    reloadSelect
+    reloadSelect,
+    emitParam,
+    tableRecord
   })
 </script>
 <style>

+ 6 - 2
src/template/selectEnterprise/index.vue

@@ -7,7 +7,7 @@
         <slot name="text"></slot>
       </a-space>
     </div>
-    <a-modal v-if="!disabled" v-model:open="visible" title="选择经销商" :bodyStyle="{padding:'10px'}" width="900px" :footer="null" :afterClose="handleCancel">
+    <a-modal v-if="!disabled" v-model:open="visible" :title="title" :bodyStyle="{padding:'10px'}" width="900px" :footer="null" :afterClose="handleCancel">
       <a-input class="search-panel" v-model:value="search" placeholder="搜索内容" @keyup.enter="searchData" allowClear></a-input>
       <a-table class="ant-table-striped" :row-class-name="(_record, index) => (index % 2 === 1 ? 'table-striped' : null)" :scroll="{x:'max-content',y:'500px'}" :dataSource="dataSource" :columns="props.columns || columns" size="small" :pagination="{defaultPageSize:20,total:total}" @change="onChange">
         <template #bodyCell="{ column,record }">
@@ -31,7 +31,11 @@ const props = defineProps({
   param: Object,
   columns:Array,
   disabled:Boolean,
-  autoComplete:Boolean
+  autoComplete:Boolean,
+  title: {
+    type:Number,
+    default:() => '选择经销商'
+  }
 })
 const emit = defineEmits(['onSelect'])
 const visible = ref(false)