瀏覽代碼

其他入库/盘盈盘亏-选择现存量弹窗设置为公共组件

jingbb 3 月之前
父節點
當前提交
73c9f5798a

+ 1 - 1
src/views/inventiry/inventoryCheck/components/inventoryCheckForm.vue

@@ -77,7 +77,7 @@
   import { useValidateAntFormAndTable } from '/@/hooks/system/useJvxeMethods';
   import { querystockDetailsByMainId, queryDataById, saveOrUpdate} from '../inventoryCheckForm.api';
   import {stockDetailColumns} from '../inventoryCheckForm.data';
-  import SelectStaningStockModal from './SelectStaningStockModal.vue';
+  import SelectStaningStockModal from '../../../publicComponents/SelectStaningStockModal.vue';
   import SelectProjectModal from '../../../publicComponents/SelectProjectModal.vue';
   import { JVxeTable } from '/@/components/jeecg/JVxeTable';
   import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';

+ 1 - 21
src/views/inventiry/inventoryCheck/inventoryCheckForm.api.ts

@@ -15,10 +15,6 @@ enum Api {
   stockFormProductList = '/storeCode/storeCheck/queryStoreCheckDetailsByMainId',
   submitBatch='/storeCode/storeCheck/submitBatch',
   cancelSubmitBatch='/storeCode/storeCheck/returnSubmitBatch',
-  classList='baseCode/baseProductClass/list',
-  customerList='/cuspCode/cuspCustomerProfile/list',
-  projectList='/baseCode/baseProjectArchive/list',
-  supplierList='/cuspCode/cuspSupplierProfile/list',
 }
 /**
  * 导出api
@@ -42,15 +38,6 @@ export const querystockDetailsByMainId = (id) => defHttp.get({url: Api.stockForm
  */
 export const list = (params) =>
   defHttp.get({url: Api.list, params});
-
-/**
- * 分类列表接口
- * @param params
- */
-export const ClassList = (params) =>
-  defHttp.get({url: Api.classList, params});
-
-
 /**
  * 删除单个
  */
@@ -121,11 +108,4 @@ export const cancelBatchSubmit = (params, handleSuccess) => {
       });
     }
   });
-}
-//获取客户下拉框列表
-export const CustomerOption = (params) => defHttp.get({ url: Api.customerList, params });
-
-//获取项目下拉框列表
-export const ProjectOption = (params) => defHttp.get({ url: Api.projectList, params });
-//获取供应商列表
-export const supplierOption = (params) => defHttp.get({url: Api.supplierList, params});
+}

+ 0 - 458
src/views/inventiry/otherOut/components/SelectStaningStockModal.vue

@@ -1,458 +0,0 @@
-<template>
-    <a-modal
-      title="选择现存量(Select staning stock)"
-      width="95%"
-      :visible="visible"
-      :maskClosable="false"
-      switchFullscreen
-      @ok = "handleOk"
-      @cancel="handleCancel">
-        <div>
-          <a-card  :body-style="{ padding: '10px' }" :bordered="false" style="margin: 10px;">
-            <div class="table-page-search-wrapper">
-                <a-form :model="queryParams" :label-col="labelCol" :wrapper-col="wrapperCol" @keyup.enter.native="searchQuery">
-                <a-row :gutter="24">
-                    <a-col :md="6" :sm="8">
-                        <a-form-item label="仓库(warehouse)">
-                            <JDictSelectTag v-model:value="queryParams.warehouse" placeholder="请选择" dictCode="warehouse" :disabled="fatherWarehouse!==''"/>
-                        </a-form-item>
-                    </a-col>
-                    <a-col :md="6" :sm="8">
-                        <a-form-item label="货位(goods allocation)"  :label-col="labelCol1" :wrapper-col="wrapperCol1">
-                            <JDictSelectTag v-model:value="queryParams.goodsAllocation" placeholder="请选择" dictCode="goods_allocation" :disabled="fatherGoodsAllocation!==''"/>
-                        </a-form-item>
-                    </a-col> 
-                    <template v-if="toggleSearchStatus">
-                        <a-col :md="6" :sm="8">
-                            <a-form-item label="项目(project)">
-                                <ApiSelect
-                                    :api="ProjectOption"
-                                    showSearch
-                                    v-model:value="queryParams.project"
-                                    :filterOption="false"
-                                    resultField="records"
-                                    labelField="name"
-                                    valueField="id"
-                                    :params='{pageSize:-1}'
-                                    :disabled="fatherProject!==''"
-                                />
-                            </a-form-item>
-                        </a-col>
-                        <a-col :md="6" :sm="8">
-                            <a-form-item label="供应商(supplier)">
-                                <ApiSelect
-                                    :api="supplierOption"
-                                    showSearch
-                                    v-model:value="queryParams.supplier"
-                                    :filterOption="false"
-                                    resultField="records"
-                                    labelField="name"
-                                    valueField="id"
-                                    :params='{pageSize:-1}'
-                                />
-                            </a-form-item>
-                        </a-col>
-                        <a-col :md="6" :sm="8">
-                            <a-form-item label="客户(customer)">
-                                <ApiSelect
-                                    :api="CustomerOption"
-                                    showSearch
-                                    v-model:value="queryParams.customer"
-                                    :filterOption="false"
-                                    resultField="records"
-                                    labelField="abbreviation"
-                                    valueField="id"
-                                    :params='{pageSize:-1}'
-                                />
-                            </a-form-item>
-                        </a-col>
-                        <a-col :md="6" :sm="8">
-                            <a-form-item label="产品分类(production class)" :label-col="labelCol1" :wrapper-col="wrapperCol1">
-                                <ApiSelect
-                                    :api="ClassList"
-                                    showSearch
-                                    v-model:value="queryParams.productionClass"
-                                    :filterOption="false"
-                                    resultField="records"
-                                    labelField="name"
-                                    valueField="id"
-                                    :params='{pageSize:-1}'
-                                />
-                            </a-form-item>
-                        </a-col>
-                        <a-col :md="6" :sm="8">
-                            <a-form-item label="优先级(priority)" >
-                                <JDictSelectTag v-model:value="queryParams.priority" placeholder="请选择" dictCode="priority"/>
-                            </a-form-item>
-                        </a-col>
-                       
-                        <a-col :md="6" :sm="8">
-                            <a-form-item label="机型(model)">
-                                <JDictSelectTag v-model:value="queryParams.headModel" placeholder="请选择" dictCode="model_typer" style="width: 100%;"/>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :md="6" :sm="8">
-                            <a-form-item label="编号(batch code)">
-                                <a-input placeholder="请输入" v-model:value="queryParams.batchCode"></a-input>
-                            </a-form-item>
-                        </a-col>   
-                        <a-col :md="6" :sm="8">
-                            <a-form-item label="产品编码(product code)"  :label-col="labelCol1" :wrapper-col="wrapperCol1">
-                                <a-input placeholder="请输入" v-model:value="queryParams.productCode"></a-input>
-                            </a-form-item>
-                        </a-col>
-                                             
-                    </template>
-                    <a-col :md="6" :sm="8">
-                        <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
-                            <a-button type="primary" @click="searchQuery" >查询(search)</a-button>
-                            <a-button type="primary" @click="searchReset"  style="margin-left: 8px">重置(reset)</a-button>
-                            <a @click="handleToggleSearch" style="margin-left: 8px">
-                            {{ toggleSearchStatus ? '收起' : '展开' }}
-                            <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
-                            </a>
-                        </span>
-                    </a-col>
-                </a-row>
-            </a-form>
-           </div>
-        </a-card>
-
-        <a-card  :body-style="{ padding: '10px' }" :bordered="false" style="margin: 10px;">
-            <a-alert type="info" show-icon class="alert" style="margin-bottom: 8px">
-            <template #message>
-                <template v-if="selectedRowKeys.length > 0">
-                <span>已选中 {{ selectedRowKeys.length }} 条记录</span>
-                <a-divider type="vertical" />
-                <a @click="selectedRowKeys = []">清空</a>
-                </template>
-                <template v-else>
-                <span>未选中任何数据</span>
-                </template>
-            </template>
-            </a-alert>
-            <a-table
-                :columns="columns"
-                :row-key="record => record.id"
-                :data-source="dataSource"
-                bordered
-                size="small"
-                @change="handleTableChange"
-                :pagination="pagination"
-                :scroll="{ x: 3500, y: 300 }"
-                :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
-            >
-            </a-table>
-        </a-card>
-      </div>
-    </a-modal>
-</template>
-<script lang="ts" setup>
-    import {ref, reactive } from 'vue';
-    import { defHttp} from '/@/utils/http/axios';
-    import { message } from 'ant-design-vue';
-    import { filterObj, getFileAccessHttpUrl } from '/@/utils/common/compUtils';
-    import { JDictSelectTag,ApiSelect} from '/@/components/Form';
-    import {CustomerOption,ClassList,supplierOption,ProjectOption} from '../otherOutForm.api';
-    const emit = defineEmits([ 'SelectStaningStock']); //定义emit
-    var visible = ref(false)
-    var fatherProject = ref('')
-    var fatherWarehouse = ref('')
-    var fatherGoodsAllocation = ref('')
-    const columns = [
-        {
-            title: '仓库(warehouse)',
-            dataIndex: 'warehouse',
-            key: 'warehouse',
-            align:"center",
-            width:250,
-            
-        },
-        {
-            title: '货位(goods allocation)',
-            dataIndex: 'goodsAllocation',
-            key: 'goodsAllocation',
-            align:"center"
-        },
-        {
-            title: '项目(project)',
-            dataIndex: 'projectName',
-            key: 'projectName',
-            align:"center",
-            width:250,
-            ellipsis: true,
-        },
-        {
-            title: '供应商(supplier)',
-            dataIndex: 'supplierName',
-            key: 'supplierName',
-            align:"center",
-            width:250,
-            ellipsis: true,
-        },
-        {
-            title: '客户(custormer)',
-            dataIndex: 'customerName',
-            key: 'customerName',
-            align:"center",
-            ellipsis: true,
-        },
-        {
-            title: '产品分类(production class)',
-            dataIndex: 'productionClass_dictText',
-            key: 'productionClass_dictText',
-            align:"center",
-            width:250,
-        },
-        {
-            title: '机型(model)',
-            dataIndex: 'headModel',
-            key: 'headModel',
-            align:"center"
-        },
-        {
-            title: '产品编码(product code)',
-            dataIndex: 'productCode',
-            key: 'productCode',
-            align:"center",
-            width:250,
-        },
-        {
-            title: '产品英文名(English name)',
-            key: 'englishName',
-            dataIndex: 'englishName',
-            align:"center",
-            width:250,
-        },
-        {
-            title: '产品中文名(chinese name)',
-            key: 'chineseName',
-            dataIndex: 'chineseName',
-            align:"center",
-            width:250,
-        },
-        {
-            title: '型号(childModel)',
-            key: 'childModel',
-            dataIndex: 'childModel',
-            align:"center"
-        },
-        {
-            title: '厂家(factory)',
-            key: 'factory',
-            dataIndex: 'factory',
-            align:"center",
-            width:250
-        },
-        {
-            title: '质量等级(quantity grade)',
-            key: 'quantityGrade',
-            dataIndex: 'quantityGrade',
-            align:"center",
-            width:250,
-        },
-        {
-            title: '数量(quantity)',
-            key: 'quantity',
-            dataIndex: 'quantity',
-            align:"center",
-            width:250,
-        },
-        {
-            title: '编号(batch code)',
-            key: 'batchCode',
-            dataIndex: 'batchCode',
-            align:"center",
-            width:250,
-        },
-    ];
-    const labelCol = ref({
-    xs: { span: 24 },
-    sm: { span: 9 },
-    });
-    const wrapperCol = ref({
-        xs: { span: 24 },
-        sm: { span: 15 },
-    });
-    const labelCol1 = ref({
-    xs: { span: 24 },
-    sm: { span: 12 },
-    });
-    const wrapperCol1 = ref({
-        xs: { span: 24 },
-        sm: { span: 12 },
-    });
-    const dataSource =ref([]);
-    let selectedRowKeys = ref([]);
-    let selectedRows = ref([]);
-    const toggleSearchStatus = ref(false);
-    const queryParams = ref({
-        warehouse:'',
-        goodsAllocation:"",
-        project:'',
-        projectName:'',
-        productionClass:'',
-        supplierName:'',
-        supplier:'',
-        priority:'',
-        customerName:'',
-        customer:'',
-        headModel:'',
-        batchCode:'',
-        productCode:'',
-    });
-    let pagination = ref({
-      current: 1,
-      pageSize: 10,
-      total: '', // 假设总共有100条数据
-      showSizeChanger: true,
-      showQuickJumper: true,
-      showTotal: (total, range) => {
-          return range[0] + "-" + range[1] + " 共" + total + "条"
-      },
-      size:'small'
-    });
-    function loadData(){
-        let params = getQueryParams();
-        defHttp.get({ url: '/storeCode/storeOnhand/list',params}, { isTransformResponse: false })
-        .then((res) => {
-            if (res.success) {
-                dataSource.value = res.result.records;
-                pagination.value.total = res.result.total;
-                pagination.value.current = res.result.current;
-                pagination.value.pageSize = res.result.size;                
-            } else {
-                message.error(res.message);
-            }
-        })
-        .finally(() => {
-            // loading.value = false;
-        });
-    }
-    function getQueryParams(){
-        let params = Object.assign(queryParams.value);
-        params.pageNo = pagination.value.current;
-        params.pageSize = pagination.value.pageSize;
-        if(fatherProject.value&&fatherProject.value!==''){
-            queryParams.value.project = fatherProject.value
-        }else {
-            queryParams.value.project = params.project
-        }
-        if(fatherWarehouse.value&&fatherWarehouse.value!==''){
-            queryParams.value.warehouse = fatherWarehouse.value
-        }else{
-            queryParams.value.warehouse =params.warehouse
-        }
-        if(fatherGoodsAllocation.value&&fatherGoodsAllocation.value!==''){
-            queryParams.value.goodsAllocation = fatherGoodsAllocation.value
-        }else{
-            queryParams.value.goodsAllocation = params.goodsAllocation
-        }
-        return filterObj(params);
-    }
-    function handleTableChange(paginations, filters, sorter){
-        pagination.value.total = paginations.total;
-        pagination.value.current = paginations.current;
-        pagination.value.pageSize = paginations.pageSize;
-        loadData()
-    };
-    function searchQuery(){
-        loadData();
-    }
-    function searchReset(){
-        queryParams.value = {
-            warehouse:'',
-            goodsAllocation:"",
-            project:'',
-            projectName:'',
-            productionClass:'',
-            supplierName:'',
-            supplier:'',
-            priority:'',
-            customerName:'',
-            customer:'',
-            headModel:'',
-            batchCode:'',
-            productCode:'',
-        }
-        pagination.value.current =1;
-        pagination.value.pageSize = 10; 
-        loadData();
-    }
-    function handleToggleSearch(){
-        toggleSearchStatus.value = !toggleSearchStatus.value;
-    }
-    function onSelectChange(keys,rows){
-        selectedRowKeys.value = keys
-        selectedRows.value = rows
-    }
-    function handleOk(){
-        var arrProject = [],
-        arrWareHouse=[],
-        arrGoodsAllocation=[]
-        selectedRows.value.map(item=>{
-            arrProject.push(item.project)
-            arrWareHouse.push(item.warehouse)
-            arrGoodsAllocation.push(item.goodsAllocation)
-        })
-        if(selectedRowKeys.value.length==0){
-            message.error('请勾选数据');
-        }else if(new Set(arrProject).size!==1||new Set(arrWareHouse).size!==1||new Set(arrGoodsAllocation).size!==1){
-            message.error('请勾选项目、仓库、货位都相同的数据');
-        }else{
-            emit('SelectStaningStock', selectedRows.value)
-            handleCancel()
-        }
-    }
-    function handleCancel(){
-        visible.value = false
-        selectedRowKeys.value = []
-        selectedRows.value=[]
-        queryParams.value = {
-            warehouse:'',
-            goodsAllocation:"",
-            project:'',
-            projectName:'',
-            productionClass:'',
-            supplierName:'',
-            supplier:'',
-            priority:'',
-            customerName:'',
-            customer:'',
-            headModel:'',
-            batchCode:'',
-            productCode:'',
-        }
-    }
-    function getTable(formData){
-        visible.value = true
-        if(formData.project&&formData.project!==''){
-            fatherProject.value = formData.project
-        }else{
-            fatherProject.value = ''
-        }
-        if(formData.warehouse&&formData.warehouse!==''){
-            fatherWarehouse.value = formData.warehouse
-        }else{
-            fatherWarehouse.value = ''
-        }
-        if(formData.goodsAllocation&&formData.goodsAllocation!==''){
-            fatherGoodsAllocation.value = formData.goodsAllocation
-        }else{
-            fatherGoodsAllocation.value = ''
-        }
-        loadData()
-    }
-    defineExpose({
-      getTable
-    });
-</script>
-<style scoped lang="less">
-/deep/.ant-form-item{
-    margin-bottom: 8px !important;
-}
-// /deep/.ant-table-wrapper .ant-table-thead > tr > th, .ant-table-wrapper .ant-table-thead > tr > td{
-//     padding: 8px !important;
-// }
-
-</style>

+ 1 - 1
src/views/inventiry/otherOut/components/otherOutForm.vue

@@ -80,7 +80,7 @@
   import { useValidateAntFormAndTable } from '/@/hooks/system/useJvxeMethods';
   import { queryOtherOutByMainId, queryDataById, saveOrUpdate} from '../otherOutForm.api';
   import {otherOutDetailColumns} from '../otherOutForm.data';
-  import SelectStaningStockModal from './SelectStaningStockModal.vue';
+  import SelectStaningStockModal from '../../../publicComponents/SelectStaningStockModal.vue';
   import { JVxeTable } from '/@/components/jeecg/JVxeTable';
   import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
   import JUpload from '/@/components/Form/src/jeecg/components/JUpload/JUpload.vue';

+ 1 - 1
src/views/inventiry/inventoryCheck/components/SelectStaningStockModal.vue → src/views/publicComponents/SelectStaningStockModal.vue

@@ -153,7 +153,7 @@
     import { message } from 'ant-design-vue';
     import { filterObj, getFileAccessHttpUrl } from '/@/utils/common/compUtils';
     import { JDictSelectTag,ApiSelect} from '/@/components/Form';
-    import {CustomerOption,ClassList,supplierOption,ProjectOption} from '../inventoryCheckForm.api';
+    import {CustomerOption,ClassList,supplierOption,ProjectOption} from '../inventiry/otherout/otherOutForm.api';
     const emit = defineEmits([ 'SelectStaningStock']); //定义emit
     var visible = ref(false)
     var fatherProject = ref('')