Procházet zdrojové kódy

销售入库-完善功能点

jingbb před 5 měsíci
rodič
revize
edbaae98b6

+ 31 - 25
src/views/inventiry/salesOutbound/components/SelectDeliveryModal.vue

@@ -18,7 +18,7 @@
                         </a-form-item>
                     </a-col>
                     <a-col :md="6" :sm="8">
-                        <a-form-item label="发货日期(delivery date)">
+                        <a-form-item label="发货日期(delivery date)" :label-col="labelCol1" :wrapper-col="wrapperCol1">
                             <a-range-picker value-format="YYYY-MM-DD"  v-model:value="deliveryDate"  @change="chengDeliveryDate" class="query-group-cust"/>
                         </a-form-item>
                     </a-col> 
@@ -38,22 +38,22 @@
                             </a-form-item>
                         </a-col>
                         <a-col :md="6" :sm="8">
-                            <a-form-item label="客户(customer)">
-                                <a-input placeholder="请输入" v-model:value="queryParams.quotationCustomerName"></a-input>
+                            <a-form-item label="客户(customer)" :label-col="labelCol1" :wrapper-col="wrapperCol1">
+                                <a-input placeholder="请输入" v-model:value="queryParams.customerName"></a-input>
                             </a-form-item>
                         </a-col>
+                        
                         <a-col :md="6" :sm="8">
-                            <a-form-item label="产品分类(production class)" :label-col="labelCol1" :wrapper-col="wrapperCol1">
-                                <!-- <a-input placeholder="请输入" v-model:value="queryParams.classId"></a-input> -->
-                                <JSelectInput   v-model:value="queryParams.productionClass"  placeholder="请选择" :options="classOption" ></JSelectInput>
+                            <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="优先级(priority)" >
-                                <JDictSelectTag v-model:value="queryParams.priority" placeholder="请选择" dictCode="priority"/>
+                            <a-form-item label="产品分类(production class)" :label-col="labelCol1" :wrapper-col="wrapperCol1">
+                                <!-- <a-input placeholder="请输入" v-model:value="queryParams.classId"></a-input> -->
+                                <JSelectInput   v-model:value="queryParams.productionClass"  placeholder="请选择" :options="classOption" ></JSelectInput>
                             </a-form-item>
                         </a-col>
-                       
                         <a-col :md="6" :sm="8">
                             <a-form-item label="机型(model)">
                                 <a-input placeholder="请输入" v-model:value="queryParams.headModel"></a-input>
@@ -65,16 +65,17 @@
                                 <a-input placeholder="请输入" v-model:value="queryParams.englishName"></a-input>
                             </a-form-item>
                         </a-col>
-                        <a-col :md="6" :sm="8">
-                            <a-form-item label="产品编码(product code)">
-                                <a-input placeholder="请输入" v-model:value="queryParams.productCode"></a-input>
-                            </a-form-item>
-                        </a-col>
+                      
                         <a-col :md="6" :sm="8">
                             <a-form-item label="型号(model)">
                                 <a-input placeholder="请输入" v-model:value="queryParams.childModel"></a-input>
                             </a-form-item>
-                        </a-col>                        
+                        </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">
@@ -146,7 +147,8 @@
             title: '发货日期(delivery date)',
             dataIndex: 'deliveryDate',
             key: 'deliveryDate',
-            align:"center"
+            align:"center",
+            width:250,
         },
         {
             title: '项目(project)',
@@ -180,19 +182,22 @@
             title: '机型(model)',
             dataIndex: 'headModel',
             key: 'headModel',
-            align:"center"
+            align:"center",
+            ellipsis: true,
         },
         {
             title: '销售部门(sale department)',
             dataIndex: 'saleDepartment',
             key: 'saleDepartment',
-            align:"center"
+            align:"center",
+            width:250,
         },
         {
             title: '业务员(salesman)',
             dataIndex: 'salesman',
             key: 'salesman',
-            align:"center"
+            align:"center",
+            ellipsis: true,
         },
         {
             title: '产品编码(product code)',
@@ -212,14 +217,15 @@
             title: '型号(childModel)',
             key: 'childModel',
             dataIndex: 'childModel',
-            align:"center"
+            align:"center",
+            ellipsis: true,
         },
         {
             title: '厂家(factory)',
             key: 'factory',
+            ellipsis: true,
             dataIndex: 'factory',
             align:"center",
-            width:250
         },
         {
             title: '质量等级(quantity grade)',
@@ -233,21 +239,21 @@
             key: 'quantity',
             dataIndex: 'quantity',
             align:"center",
-            width:250,
+            ellipsis: true,
         },
         {
             title: '单价(price)',
             key: 'salePrice',
             dataIndex: 'salePrice',
             align:"center",
-            width:250,
+            ellipsis: true,
         },
         {
             title: '金额(tax money)',
             key: 'taxAmount',
             dataIndex: 'taxAmount',
             align:"center",
-            width:250,
+            ellipsis: true,
         },
     ];
     const labelCol = ref({
@@ -299,7 +305,7 @@
     });
     function loadData(){
         let params = getQueryParams();
-        defHttp.get({ url: '/saleCode/saleQuotation/saleQuotationDetailsAlert',params}, { isTransformResponse: false })
+        defHttp.get({ url: '/saleCode/saleDelivery/selectSaleDeliveryAlert',params}, { isTransformResponse: false })
         .then((res) => {
             if (res.success) {
                 dataSource.value = res.result.records;

+ 83 - 0
src/views/inventiry/salesOutbound/components/SetIsExport.vue

@@ -0,0 +1,83 @@
+<template>
+    <a-modal
+      title="设置是否出口(set isExport)"
+      width="45%"
+      :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="form" :label-col="labelCol" :wrapper-col="wrapperCol" >
+                <a-row :gutter="24">
+                    <a-col :md="24" :sm="24">
+                        <a-form-item label="是否出口(isExport)">
+                            <JDictSelectTag v-model:value="form.export" placeholder="请选择" dictCode="yes_or_no" style="width: 100%;"/>
+                        </a-form-item>
+                    </a-col>
+                </a-row>
+            </a-form>
+           </div>
+        </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 { JDictSelectTag} from '/@/components/Form';
+    var visible = ref(false);
+    const emit = defineEmits([ 'success']); //定义emit
+    var form = ref({
+        export :""
+    });
+    const labelCol = ref({
+        xs: { span: 24 },
+        sm: { span: 5 },
+    });
+    const wrapperCol = ref({
+        xs: { span: 24 },
+        sm: { span: 19 },
+    });
+    var fatherIds=ref("");
+    function handleOk(){
+        let params ={
+            ids:fatherIds.value,
+            export  : form.value.export
+        }
+        defHttp
+        .get({ url: '/storeCode/storeSaleOut/setExport',params}, { isTransformResponse: false })
+        .then((res) => {
+            if (res.success) {
+                emit('success')
+                handleCancel()
+            }else{
+                message.error(res.message);
+            }
+        })
+    }
+    function handleCancel(){
+        visible.value = false;
+        form.value.export=''
+        fatherIds.value = ''
+    }
+    function getTable(ids){
+        visible.value = true
+        fatherIds.value = ids
+    }
+    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>

+ 75 - 42
src/views/inventiry/salesOutbound/components/salesOutForm.vue

@@ -78,16 +78,19 @@
               <!-- 逻辑不通暂时取消次功能 -->
               <!-- <a>复制(copy)</a> -->
             </template>
+            <template #inventorySelection="props">
+              <a-input-search  v-model:value="props.row.inventorySelection"   allow-clear enter-button="Search" @search="onSearchInventory(props)"></a-input-search>
+            </template>
           </j-vxe-table>
       </a-tab-pane>
-      <a-tab-pane tab="销售出库 - 船明细(ship details)" key="purInShip" :forceRender="true">
+      <a-tab-pane tab="销售出库 - 船明细(ship details)" key="saleShip" :forceRender="true">
         <j-vxe-table
           :keep-source="true"
           resizable
-          ref="purInShipTableRef"
-          :loading="purInShipTable.loading"
-          :columns="purInShipTable.columns"
-          :dataSource="purInShipTable.dataSource"
+          ref="saleShipTableRef"
+          :loading="saleShipTable.loading"
+          :columns="saleShipTable.columns"
+          :dataSource="saleShipTable.dataSource"
           :height="340"
           :disabled="disabled"
           :rowNumber="true"
@@ -101,7 +104,8 @@
      
     </a-tabs>
     <BaseShipArchiveAccessoriesModal ref="BaseShipArchiveAccessoriesModalRef"></BaseShipArchiveAccessoriesModal>
-    <SelectDeliveryModal ref="SelectDeliveryModalRef" ></SelectDeliveryModal>
+    <SelectDeliveryModal ref="SelectDeliveryModalRef" @SelectDelivery="getDeliveryList"></SelectDeliveryModal>
+    <SelectStaningStockModal ref="SelectStaningStockModalRef" @SelectStaningStock="editDetailRow"></SelectStaningStockModal>
   </a-spin>
 </template>
 
@@ -109,10 +113,11 @@
   import { defineComponent, ref, reactive, computed, toRaw} from 'vue';
   import { defHttp } from '/@/utils/http/axios';
   import { useValidateAntFormAndTable } from '/@/hooks/system/useJvxeMethods';
-  import { queryPurInFormShipFormShippTable, querystockOutByMainId, queryDataById, saveOrUpdate} from '../salesOutboundForm.api';
+  import { querySaleOutShipFormShip, querystockOutByMainId, queryDataById, saveOrUpdate} from '../salesOutboundForm.api';
   import { JVxeTable } from '/@/components/jeecg/JVxeTable';
   import {stockOutShipColumns, stockOutColumns} from '../salesOutboundForm.data';
   import BaseShipArchiveAccessoriesModal from '../../../publicComponents/BaseShipArchiveAccessoriesModal.vue';
+  import SelectStaningStockModal from '../../../publicComponents/SelectStaningStockModal.vue';
   import SelectDeliveryModal from './SelectDeliveryModal.vue';
   import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
   import JUpload from '/@/components/Form/src/jeecg/components/JUpload/JUpload.vue';
@@ -129,7 +134,8 @@
       JUpload,
       JDictSelectTag,
       BaseShipArchiveAccessoriesModal,
-      SelectDeliveryModal
+      SelectDeliveryModal,
+      SelectStaningStockModal
     },
     props:{
       formDisabled:{
@@ -144,9 +150,10 @@
       const userStore = useUserStore();
       const loading = ref(false);
       const formRef = ref();
-      const purInShipTableRef = ref();
+      const saleShipTableRef = ref();
+      const SelectStaningStockModalRef = ref();
       const BaseShipArchiveAccessoriesModalRef = ref();
-      const purInShipTable = reactive<Record<string, any>>({
+      const saleShipTable = reactive<Record<string, any>>({
         loading: false,
         columns: stockOutShipColumns,
         dataSource: []
@@ -176,6 +183,9 @@
         goodsAllocation:'',
         warehouse:'',
         notes:'',
+        isExport:'',
+        maker:'',
+        model:'',
       });
       //表单验证
       const validatorRules = reactive({
@@ -205,7 +215,7 @@
 
       function add() {
         resetFields();
-        purInShipTable.dataSource = [];
+        saleShipTable.dataSource = [];
         stockOutTable.dataSource = [];
         activeKey.value = 'stockOut'
         formData.salesman=userStore.getUserInfo.username;
@@ -215,8 +225,8 @@
         //主表数据
         await queryMainData(row.id);
         //子表数据
-        const purInShipDataList = await queryPurInFormShipFormShippTable(row['id']);
-        purInShipTable.dataSource = [...purInShipDataList];
+        const saleShipDataList = await querySaleOutShipFormShip(row['id']);
+        saleShipTable.dataSource = [...saleShipDataList];
         const stockOutDataList = await querystockOutByMainId(row['id']);
         stockOutTable.dataSource = [...stockOutDataList];
       }
@@ -235,8 +245,8 @@
       }
      
       const {getSubFormAndTableData, transformData} = useValidateAntFormAndTable(activeKey, {
-        'storePurchaseInShip': purInShipTableRef,
-        'storePurchaseInDetails': stockOutTableRef,
+        'storeSaleOutShip': saleShipTableRef,
+        'storeSaleOutDetails': stockOutTableRef,
       });
 
       async function getFormData() {
@@ -279,10 +289,10 @@
       }
       function getShipList(id){
         let params = {id:id}
-        let url = '/purCode/purDeliveryNote/queryPurDeliveryNodeShipByMainId'
+        let url = '/saleCode/saleDelivery/querySaleDeliveryShipByMainId'
           defHttp.get({url:url,params}, { isTransformResponse: false }).then(res=>{
             if(res){
-              purInShipTable.dataSource = res.result
+              saleShipTable.dataSource = res.result
             }
           })
       }
@@ -300,26 +310,6 @@
           formData.sourceCode=''
         }
       }
-      function addstockOutList(data){
-        formData.project = data[0].project
-        formData.projectName = data[0].projectName
-        formData.supplier = data[0].supplier
-        formData.supplierName = data[0].supplierName
-        formData.delivery = data[0].delivery
-        formData.productionClass = data[0].productionClass
-        formData.model = data[0].model
-        formData.maker = data[0].maker
-        formData.sourceCode = data[0].billCode
-        formData.arrivalDetails = data[0].arrivalDetails
-        getShipList(data[0].headId)
-        var arr = data.concat(stockOutTable.dataSource)
-        arr.map(item=>{
-          item.model = item.childModel
-          item.sourceId = item.childId
-          item.arrivalQuantity = item.quantity
-        })
-        stockOutTable.dataSource=arr  
-      }
       /**
        * 值改变事件触发-树控件回调
        * @param key
@@ -331,10 +321,50 @@
       function selectDelivery(){
         SelectDeliveryModalRef.value.getTable(formData)
       }
-
+      function getDeliveryList(data){
+        data.map((item)=>{
+          item.model = item.childModel
+          item.sourceId = item.childId
+          item.deliveryQuantity = item.quantity
+        })
+        var arrProduct = data.concat(stockOutTable.dataSource)
+        stockOutTable.dataSource=arrProduct  
+        formData.sourceCode =data[0].billCode
+        formData.project = data[0].project
+        formData.projectName = data[0].projectName
+        formData.customerName = data[0].customerName
+        formData.customer = data[0].customer
+        formData.productionClass =data[0].productionClass
+        formData.model =data[0].headModel
+        formData.maker =data[0].maker
+        formData.isExport = data[0].isExport  
+        getShipList(data[0].headId)
+      }
+      function onSearchInventory(props){
+        if(formData.projectName==''||formData.customerName==''||formData.customerName==''||!props.row.productId||props.row.productId==''||formData.warehouse==''||formData.goodsAllocation==''){
+          message.error('请先选择项目、客户、仓库、货位、产品编码!')
+        }else{
+          var obj = Object.assign({}, formData)
+          obj.productCode = props.row.productCode
+          obj.identification = props.row.childId?props.row.childId:props.row.sourceId
+          SelectStaningStockModalRef.value.getTable(obj)
+        }
+      }
+      function editDetailRow(data,rowId){
+        var arr = [...stockOutTable.dataSource]
+        arr.map(item=>{
+          var id = item.childId?item.childId:item.sourceId
+          if(id==rowId){
+            item.stockOutQuantity = data[0].quantity
+            item.inventorySelection = data[0].batchCode
+            item.batchId = data[0].id
+          }
+        })
+        stockOutTable.dataSource = [...arr]
+      }
       return {
-        purInShipTableRef,
-        purInShipTable,
+        saleShipTableRef,
+        saleShipTable,
         stockOutTableRef,
         stockOutTable,
         validatorRules,
@@ -354,9 +384,12 @@
         handleDelete,
         BaseShipArchiveAccessoriesModalRef,
         viewAccessory,
-        addstockOutList,
         SelectDeliveryModalRef,
-        selectDelivery
+        selectDelivery,
+        getDeliveryList,
+        onSearchInventory,
+        SelectStaningStockModalRef,
+        editDetailRow
       }
     }
   });

+ 37 - 14
src/views/inventiry/salesOutbound/salesOutboundForm.api.ts

@@ -4,19 +4,21 @@ import { useMessage } from "/@/hooks/web/useMessage";
 const { createConfirm } = useMessage();
 
 enum Api {
-  list = '/storeCode/storePurchaseIn/list',
-  save='/storeCode/storePurchaseIn/add',
-  edit='/storeCode/storePurchaseIn/edit',
-  deleteOne = '/storeCode/storePurchaseIn/delete',
-  deleteBatch = '/storeCode/storePurchaseIn/deleteBatch',
-  importExcel = '/storeCode/storePurchaseIn/importExcel',
-  exportXls = '/storeCode/storePurchaseIn/exportXls',
-  queryDataById = '/storeCode/storePurchaseIn/queryById',
-  purInFormShipList = '/storeCode/storePurchaseIn/queryStorePurchaseInShipByMainId',
-  stockOutFormProductList = '/storeCode/storePurchaseIn/queryStorePurchaseInDetailsByMainId',
-  submitBatch='/storeCode/storePurchaseIn/submitBatch',
-  cancelSubmitBatch='/storeCode/storePurchaseIn/returnSubmitBatch',
-  classList='baseCode/baseProductClass/list'
+  list = '/storeCode/storeSaleOut/list',
+  save='/storeCode/storeSaleOut/add',
+  edit='/storeCode/storeSaleOut/edit',
+  deleteOne = '/storeCode/storeSaleOut/delete',
+  deleteBatch = '/storeCode/storeSaleOut/deleteBatch',
+  importExcel = '/storeCode/storeSaleOut/importExcel',
+  exportXls = '/storeCode/storeSaleOut/exportXls',
+  queryDataById = '/storeCode/storeSaleOut/queryById',
+  saleOrderFormShipList = '/storeCode/storeSaleOut/queryStoreSaleOutShipByMainId',
+  stockOutFormProductList = '/storeCode/storeSaleOut/queryStoreSaleOutDetailsByMainId',
+  submitBatch='/storeCode/storeSaleOut/submitBatch',
+  cancelSubmitBatch='/storeCode/storeSaleOut/returnSubmitBatch',
+  editSign='/storeCode/storeSaleOut/updateSigning',
+  classList='baseCode/baseProductClass/list',
+  invoice='/storeCode/storeSaleOut/applyInvoice'
 }
 /**
  * 导出api
@@ -33,7 +35,7 @@ export const getImportUrl = Api.importExcel;
  * 查询子表数据
  * @param params
  */
-export const queryPurInFormShipFormShippTable = (id) => defHttp.get({url: Api.purInFormShipList, params:{ id }});
+export const querySaleOutShipFormShip= (id) => defHttp.get({url: Api.saleOrderFormShipList, params:{ id }});
 /**
  * 查询子表数据
  * @param params
@@ -47,6 +49,27 @@ export const querystockOutByMainId = (id) => defHttp.get({url: Api.stockOutFormP
 export const list = (params) =>
   defHttp.get({url: Api.list, params});
 
+
+/**
+ * 上传签单后调用接口修改列表中签单字段
+ * @param params
+ */
+export const editSignSing = (params, handleSuccess) => {
+   defHttp.get({url: Api.editSign, params}, {joinParamsToUrl: true}).then(() => {
+        handleSuccess();
+    });
+}
+
+/**
+ * 开票申请
+ * @param params
+ */
+export const applyInvoice = (params, handleSuccess) => {
+  defHttp.get({url: Api.invoice, params}, {joinParamsToUrl: true}).then(() => {
+       handleSuccess();
+   });
+}
+
 /**
  * 分类列表接口
  * @param params

+ 6 - 5
src/views/inventiry/salesOutbound/salesOutboundForm.data.ts

@@ -60,7 +60,7 @@ export const columns: BasicColumn[] = [
    {
     title: '出口(export)',
     align:"center",
-    dataIndex: 'export',
+    dataIndex: 'isExport',
    },
    {
     title: '开票申请(apply invoice)',
@@ -71,11 +71,12 @@ export const columns: BasicColumn[] = [
     title: '签单(Signing)',
     align:"center",
     dataIndex: 'signing',
+    slots: { customRender: 'signing' },
    },
    {
     title: '提交(submit)',
     align:"center",
-    dataIndex: 'submit_dictText',
+    dataIndex: 'submit',
    },
 ];
 
@@ -229,13 +230,13 @@ export const stockOutColumns: JVxeColumn[] = [
     },
     {
       title: '库存选择(inventory selsection)',
-      key: 'inventorySelsection',
-      width:"200px",
+      key: 'inventorySelection',
+      width:"300px",
       placeholder: '请输入${title}',
       defaultValue:'',
       type: JVxeTypes.slot,
       // slot 的名称,对应 v-slot 冒号后面和等号前面的内容
-      slotName: 'inventorySelsection',
+      slotName: 'inventorySelection',
       
     },
     {

+ 63 - 8
src/views/inventiry/salesOutbound/salesOutboundList.vue

@@ -97,20 +97,22 @@
      <BasicTable @register="registerTable" :rowSelection="rowSelection" size="small" >
        <!--插槽:table标题-->
         <template #tableTitle>
-            <a-button type="primary" v-auth="'saleCode:sale_order:add'"  @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增(add)</a-button>
-            <a-button  type="primary" v-auth="'saleCode:sale_order:exportXls'"  preIcon="ant-design:export-outlined" @click="onExportXls"> 导出(export)</a-button>
+            <a-button type="primary" v-auth="'storeCode:store_sale_out:add'"  @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增(add)</a-button>
+            <a-button  type="primary" v-auth="'storeCode:store_sale_out:exportXls'"  preIcon="ant-design:export-outlined" @click="onExportXls"> 导出(export)</a-button>
             <a-button  type="primary"  @click="submit" > 提交(submit)</a-button>
             <a-button  type="primary"  @click="cancelSubmit"> 取消提交(cancelSubmit)</a-button>
+            <a-button  type="primary"  @click="setIsExport"> 设置其他状态(set isExport)</a-button>
+            <a-button  type="primary"  @click="allowInvoice"> 开票申请(apply invoice)</a-button>
             <a-dropdown v-if="selectedRowKeys.length > 0">
                 <template #overlay>
                   <a-menu>
-                    <a-menu-item key="1" @click="batchHandleDelete"  v-auth="'saleCode:sale_order_form:deleteBatch'">
+                    <a-menu-item key="1" @click="batchHandleDelete"  v-auth="'storeCode:store_sale_out:deleteBatch'">
                       <Icon icon="ant-design:delete-outlined"></Icon>
                       删除(delete)
                     </a-menu-item>
                   </a-menu>
                 </template>
-                <a-button v-auth="'saleCode:sale_order:delete'">批量操作
+                <a-button v-auth="'storeCode:store_sale_out:deleteBatch'">批量操作
                   <Icon icon="mdi:chevron-down"></Icon>
                 </a-button>
           </a-dropdown>
@@ -122,9 +124,18 @@
         <!--字段回显插槽-->
         <template v-slot:bodyCell="{ column, record, index, text }">
         </template>
+
+        <template #signing="props">
+          <a-upload name="file" :showUploadList="false" :action="uploadUrl" :headers="headers"  @change="value => handleChange(value, props)">
+            <a>上传(upload)</a>
+          </a-upload>
+          <a>/</a>
+          <a :href="props.record.signing">查看</a>
+        </template>
       </BasicTable>
       <!-- 表单区域 -->
       <salesOutFormModal @register="registerModal" @success="handleSuccess"></salesOutFormModal>
+      <SetIsExport ref="setIsExportRef" @success="handleSuccess"></SetIsExport>
     </div>
   </template>
   
@@ -134,19 +145,27 @@
     import { useListPage } from '/@/hooks/system/useListPage'
     import {useModal} from '/@/components/Modal';
     import salesOutFormModal from './components/salesOutFormModal.vue'
+    import SetIsExport from './components/SetIsExport.vue'
     import {columns} from './salesOutboundForm.data';
-    import {list, deleteOne, batchDelete, getImportUrl,getExportUrl,batchSubmit,cancelBatchSubmit} from './salesOutboundForm.api';
+    import {list, deleteOne, batchDelete, getImportUrl,getExportUrl,batchSubmit,cancelBatchSubmit,editSignSing,applyInvoice} from './salesOutboundForm.api';
     import { cloneDeep } from "lodash-es";
     import { defHttp } from '/@/utils/http/axios';
     import { JDictSelectTag} from '/@/components/Form';
     import JSelectInput from '/@/components/Form/src/jeecg/components/JSelectInput.vue';
     import { message } from 'ant-design-vue';
+    import { useGlobSetting } from '/@/hooks/setting';
+    import { getHeaders } from '/@/utils/common/compUtils';
+    const globSetting = useGlobSetting();
+    const baseUploadUrl = globSetting.uploadUrl;
+    const uploadUrl = `${baseUploadUrl}/sys/common/upload`;
+    const headers = getHeaders();
     const formRef = ref();
     const queryParam = reactive<any>({
     });
     //注册model
     const [registerModal, {openModal}] = useModal();
     var classOption = ref([]);
+    const setIsExportRef=ref();
      //注册table数据
     const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({
         tableProps:{
@@ -260,7 +279,7 @@
            {
              label: '编辑(edit)',
              onClick: handleEdit.bind(null, record),
-             auth: 'saleCode:sale_order:edit',
+             auth: 'storeCode:store_sale_out:edit',
              ifShow: record.submit=='0'||!record.submit
            },
            {
@@ -287,7 +306,7 @@
                confirm: handleDelete.bind(null, record),
                placement: 'topLeft'
              },
-             auth: 'saleCode:sale_order:delete',
+             auth: 'storeCode:store_sale_out:delete',
              ifShow: record.submit=='0'||!record.submit
            }
          ]
@@ -308,7 +327,43 @@
         cancelBatchSubmit({ids: ids},handleSuccess);
       }
     }
-  
+    function allowInvoice(){
+      if(selectedRowKeys.value.length==0){
+        message.warning('请选择数据')
+      }else{
+        var ids=selectedRowKeys.value.join(',')
+        applyInvoice({ids: ids},handleSuccess);
+      }
+    }
+    function setIsExport(){
+      if(selectedRowKeys.value.length==0){
+        message.warning('请选择数据')
+      }else{
+        var ids=selectedRowKeys.value.join(',')
+        setIsExportRef.value.getTable(ids)
+      }
+    }
+    function handleChange(info,props){
+        if (info.file.status !== 'uploading') {
+          // console.log(info.file, info.fileList);
+        }
+        if (info.file.status === 'done') {
+          if (info.file.response.success) {
+            editSinging(info.file.response.message,props.record)
+          } else {
+            message.error(`${info.file.name} ${info.file.response.message}.`);
+          }
+        } else if (info.file.status === 'error') {
+          message.error(`文件上传失败: ${info.file.msg} `);
+        }
+      }
+    function editSinging(fileName,record){
+      var params = {
+        id: record.id,
+        signing: baseUploadUrl+'/sys/common/static/'+fileName
+      }
+      editSignSing(params,handleSuccess);
+    }
     /* ----------------------以下为原生查询需要添加的-------------------------- */
     const toggleSearchStatus = ref<boolean>(false);
     const labelCol = reactive({

+ 434 - 0
src/views/publicComponents/SelectStaningStockModal.vue

@@ -0,0 +1,434 @@
+<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)">
+                            <a-input placeholder="请输入" v-model:value="queryParams.warehouse"  :disabled="father.warehouse!==''"></a-input>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :md="6" :sm="8">
+                        <a-form-item label="货位(goods allocation)">
+                            <a-input placeholder="请输入" v-model:value="queryParams.goodsAllocation" :disabled="father.goodsAllocation!==''"></a-input>
+                        </a-form-item>
+                    </a-col> 
+                    <template v-if="toggleSearchStatus">
+                        <a-col :md="6" :sm="8">
+                            <a-form-item label="项目(project)">
+                                <ApiSelect
+                                    :api="projectListList"
+                                    showSearch
+                                    v-model:value="queryParams.project"
+                                    optionFilterProp="label"
+                                    resultField="records"
+                                    labelField="name"
+                                    valueField="id"
+                                    :disabled="father.project!==''"
+                                    />
+                            </a-form-item>
+                        </a-col>
+                        <a-col :md="6" :sm="8">
+                            <a-form-item label="供应商(supplier)">
+                                <a-input placeholder="请输入" v-model:value="queryParams.supplierName"></a-input>
+                            </a-form-item>
+                        </a-col>
+                        <a-col :md="6" :sm="8">
+                            <a-form-item label="客户(customer)">
+                                <a-input placeholder="请输入" v-model:value="queryParams.customerName"></a-input>
+                            </a-form-item>
+                        </a-col>
+                        <a-col :md="6" :sm="8">
+                            <a-form-item label="产品分类(production class)" :label-col="labelCol1" :wrapper-col="wrapperCol1">
+                                <!-- <a-input placeholder="请输入" v-model:value="queryParams.classId"></a-input> -->
+                                <JSelectInput   v-model:value="queryParams.productionClass"  placeholder="请选择" :options="classOption" ></JSelectInput>
+                            </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="产品编码(product code)" :label-col="labelCol1" :wrapper-col="wrapperCol1">
+                                <a-input placeholder="请输入" v-model:value="queryParams.productCode"  :disabled="father.productCode!==''"></a-input>
+                            </a-form-item>
+                        </a-col>  
+                        <a-col :md="6" :sm="8">
+                            <a-form-item label="机型(model)">
+                                <a-input placeholder="请输入" v-model:value="queryParams.headModel"></a-input>
+                            </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>                        
+                    </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} from '/@/components/Form';
+     import {  ApiSelect, } from '/@/components/Form/index';
+    import JSelectInput from '/@/components/Form/src/jeecg/components/JSelectInput.vue';
+    const emit = defineEmits([ 'SelectStaningStock']); //定义emit
+    let classOption = ref([])
+    var visible = ref(false)
+    var father = 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: 'productClass',
+            key: 'productClass',
+            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: '型号(model)',
+            key: 'model',
+            dataIndex: 'model',
+            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(father.value.project&&father.value.Project!==''){
+            queryParams.value.project = father.value.project
+        }else {
+            queryParams.value.project = params.project
+        }
+        if(father.value.goodsAllocation&&father.value.goodsAllocation!==''){
+            queryParams.value.goodsAllocation = father.value.goodsAllocation
+        }else {
+            queryParams.value.goodsAllocation = params.goodsAllocation
+        }
+        if(father.value.productCode&&father.value.productCode!==''){
+            queryParams.value.productCode = father.value.productCode
+        }else {
+            queryParams.value.productCode = params.productCode
+        }
+        if(father.value.warehouse&&father.value.warehouse!==''){
+            queryParams.value.warehouse = father.value.warehouse
+        }else {
+            queryParams.value.warehouse = params.warehouse
+        }
+        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 projectListList(){
+        let params = {pageSize:-1}
+        return defHttp.get({url:'/baseCode/baseProjectArchive/list',params});
+    }
+    function getOptiom(){
+    defHttp
+        .get({ url: 'baseCode/baseProductClass/list'}, { isTransformResponse: false })
+        .then((res) => {
+            if (res.success) {
+              classOption.value = []
+              res.result.records.forEach(element => {
+                  var obj = {
+                    label: element.name?element.name:'无名称请维护',
+                    value: element.name?element.name:''
+                  };
+                  classOption.value.push( obj)
+              });    
+            }
+        })
+        .finally(() => {
+            // loading.value = false;
+        });
+  }
+    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(){
+        if(selectedRowKeys.value.length!==1){
+            message.error('请勾选一条数据');
+        }else{
+            emit('SelectStaningStock', selectedRows.value,father.value.identification)
+            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
+        father.value = Object.assign({},formData)
+        loadData()
+        getOptiom()
+    }
+    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>