Browse Source

销售询价单-显示问题/删除问题

jingbb 5 months ago
parent
commit
4cab8c1bab

+ 24 - 5
src/views/saleCode/saleInquiryForm/SaleInquiryForm.data.ts

@@ -101,11 +101,6 @@ export const columns: BasicColumn[] = [
     dataIndex: 'inquiryTeam',
     width:'250'
    },
-   {
-    title: '业务类型(busyness type)',
-    align:"center",
-    dataIndex: 'busynessType',
-   },
    {
     title: '状态(status)',
     align:"center",
@@ -245,6 +240,30 @@ export const saleInquiryFormProductColumns: JVxeColumn[] = [
       width:"200px",
       defaultValue:'',
     },
+    {
+      title: '备件号(partno)',
+      key: 'partno',
+      type: JVxeTypes.normal,
+      placeholder: '请输入${title}',
+      width:"200px",
+      defaultValue:'',
+    },
+    {
+      title: '订货号(orderno)',
+      key: 'orderno',
+      type: JVxeTypes.normal,
+      placeholder: '请输入${title}',
+      width:"200px",
+      defaultValue:'',
+    },
+    {
+      title: '图号(drawingno)',
+      key: 'drawingno',
+      type: JVxeTypes.normal,
+      placeholder: '请输入${title}',
+      width:"200px",
+      defaultValue:'',
+    },
     {
       title: '厂家(factory)',
       key: 'factory',

+ 1 - 1
src/views/saleCode/saleInquiryForm/SaleInquiryFormList.vue

@@ -139,7 +139,7 @@
           <a-button  type="primary" v-auth="'saleCode:sale_inquiry_form:exportXls'"  preIcon="ant-design:export-outlined" @click="onExportXls"> 导出(export)</a-button>
           <a-button  type="primary"  @click="setStatus"> 设置其他状态(set other status)</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="cancelSubmit"> 取消提交(cancelSubmit)</a-button>
           <a-dropdown v-if="selectedRowKeys.length > 0">
               <template #overlay>
                 <a-menu>

+ 15 - 11
src/views/saleCode/saleInquiryForm/components/SaleInquiryFormForm.vue

@@ -39,11 +39,6 @@
                 <a-range-picker v-model:value="inquiryPeriod" :format="['YYYY-MM-DD','YYYY-MM-DD']"  @change="onChangeInquiryPeriod" style="width: 100%" />
 							</a-form-item>
 						</a-col>
-						<a-col :span="12">
-							<a-form-item label="业务类型(busyness type)" v-bind="validateInfos.busynessType" id="SaleInquiryFormForm-busynessType" name="busynessType">
-                <JDictSelectTag v-model:value="formData.busynessType" placeholder="请选择" dictCode="busyness_type"/>
-							</a-form-item>
-						</a-col>
 						<a-col :span="12">
 							<a-form-item label="优先级(priority)" v-bind="validateInfos.priority" id="SaleInquiryFormForm-priority" name="priority">
                 <JDictSelectTag v-model:value="formData.priority" placeholder="请选择" dictCode="priority"/>
@@ -140,6 +135,7 @@
           :disabled="disabled"
           :rowNumber="true"
           :rowSelection="true"
+          asyncRemove
           >
           <template #action="props">
                 <a-popconfirm title="确定删除吗?" @confirm="handleDelete1(props)">
@@ -176,7 +172,9 @@
   import JSelectUser from '/@/components/Form/src/jeecg/components/JSelectUser.vue';
   import JSelectDept from '/@/components/Form/src/jeecg/components/JSelectDept.vue';
   import { Form } from 'ant-design-vue';
+  import { useUserStore } from '/@/store/modules/user';
   import moment from 'moment';
+  const userStore = useUserStore();
   const useForm = Form.useForm;
   export default defineComponent({
     name: "SaleInquiryFormForm",
@@ -283,7 +281,9 @@
         activeKey.value = 'saleInquiryFormShip'
         getOptiom()
         getCustomerOptions()
-           inquiryPeriod.value = []
+        inquiryPeriod.value = []
+        formData.salesman=userStore.getUserInfo.username;
+        formData.saleDepartment = userStore.getUserInfo.orgCode
       }
 
       async function edit(row) {
@@ -361,11 +361,15 @@
       function handleFormChange(key, value) {
         formData[key] = value;
       }
-      function handleDelete({row}) {
-        saleInquiryFormShipTableRef.value?.removeRows(row)   
+      async function handleDelete(prop) {
+        var newArray = [...saleInquiryFormProductTable.dataSource]
+        newArray.splice(prop.rowIndex, 1)
+        saleInquiryFormShipTable.dataSource = newArray 
       }
-      function handleDelete1({row}) {
-        saleInquiryFormProductTableRef.value?.removeRows(row)    
+      async function handleDelete1(prop) {
+        var newArray = [...saleInquiryFormProductTable.dataSource]
+        newArray.splice(prop.rowIndex, 1)
+        saleInquiryFormProductTable.dataSource = newArray  
       }
       function selectShip(){
         SelectShipSModalRef.value.getTable()
@@ -379,7 +383,7 @@
       function addProduct(data){
         var arrProduct = data.concat(saleInquiryFormProductTable.dataSource)
         arrProduct.map(item=>{
-          item.productClass = item.classId
+          item.productClass = item.classId_dictText
           item.productCode = item.code
           item.unit = item.measurementUnit
         })

+ 2 - 2
src/views/saleCode/saleInquiryForm/components/SelectPrpductModal.vue

@@ -112,8 +112,8 @@
     const columns = [
         {
             title: '分类(class)',
-            dataIndex: 'classId',
-            key: 'classId',
+            dataIndex: 'classId_dictText',
+            key: 'classId_dictText',
             align:"center"
         },
         {

+ 4 - 5
src/views/saleCode/saleInquiryForm/components/SetOtherStatus.vue

@@ -1,6 +1,6 @@
 <template>
     <a-modal
-      title="选择产品(select product)"
+      title="设置其他状态(set other status)"
       width="45%"
       :visible="visible"
       :maskClosable="false"
@@ -13,7 +13,7 @@
                 <a-form :model="form" :label-col="labelCol" :wrapper-col="wrapperCol" >
                 <a-row :gutter="24">
                     <a-col :md="24" :sm="24">
-                        <a-form-item label="分类(class)">
+                        <a-form-item label="其他状态(otherStatus)">
                             <a-input placeholder="请输入" v-model:value="form.otherStatus"></a-input>
                         </a-form-item>
                     </a-col>
@@ -36,11 +36,11 @@
     });
     const labelCol = ref({
         xs: { span: 24 },
-        sm: { span: 3 },
+        sm: { span: 5 },
     });
     const wrapperCol = ref({
         xs: { span: 24 },
-        sm: { span: 21 },
+        sm: { span: 19 },
     });
     var fatherIds=ref("");
     function handleOk(){
@@ -65,7 +65,6 @@
         fatherIds.value = ''
     }
     function getTable(ids){
-        debugger
         visible.value = true
         fatherIds.value = ids
     }