yh преди 3 месеца
родител
ревизия
3b24689230

+ 17 - 5
src/views/BasicData/components/productArchiveModel.vue

@@ -32,22 +32,22 @@
              </a-col>
              <a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12">
                <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="chineseName" label="中文名(Chinese name)">
-                  <a-input  placeholder="请输入" v-model:value="model.chineseName" AutoComplete='off'/>
+                  <a-input  placeholder="请输入" v-model:value="model.chineseName" AutoComplete='off' @blur="handleBlur(model.chineseName,'chineseName')"/>
                </a-form-item>
              </a-col>
              <a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12">
                <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="englishName" label="英文名(English name)">
-                  <a-input  placeholder="请输入" v-model:value="model.englishName" AutoComplete='off'/>
+                  <a-input  placeholder="请输入" v-model:value="model.englishName" AutoComplete='off' @blur="handleBlur(model.englishName,'englishName')"/>
                </a-form-item>
              </a-col>
              <a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12">
                <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="chineseAlias" label="中文别名(Chinese allas)">
-                  <a-input  placeholder="请输入" v-model:value="model.chineseAlias" AutoComplete='off'/>
+                  <a-input  placeholder="请输入" v-model:value="model.chineseAlias" AutoComplete='off' @blur="handleBlur(model.chineseAlias,'chineseAlias')"/>
                </a-form-item>
              </a-col>
              <a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12">
                <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="englishAlias" label="英文别名(englidsh allas)">
-                  <a-input  placeholder="请输入" v-model:value="model.englishAlias" AutoComplete='off'/>
+                  <a-input  placeholder="请输入" v-model:value="model.englishAlias" AutoComplete='off' @blur="handleBlur(model.englishAlias,'englishAlias')"/>
                </a-form-item>
              </a-col>
              <a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12">
@@ -200,7 +200,19 @@
       var params = {pageSize:-1}
       return defHttp.get({ url: 'baseCode/baseProductClass/list',params})
   }
-  
+  function handleBlur(value,data){
+    if(value!==''){
+      var newString = ''
+      for (let i = 0; i < value.length; i++) {
+          if( (/^[A-Za-z]$/.test(value[i]))&&(/^[a-z]$/.test(value[i]))){
+            newString=newString+value[i].toUpperCase()
+          }else{
+            newString =newString+value[i]
+          }
+      }
+        model.value[data] = newString
+    }
+  }
   defineExpose({
     getForm
   });

+ 1 - 1
src/views/BasicData/productArchive.vue

@@ -116,7 +116,7 @@
         size="small"
         @change="handleTableChange"
         :pagination="pagination"
-        :scroll="{ x: 2500, y: 300 }"
+        :scroll="{ x: 2500 }"
         :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
       >
         <template #bodyCell="{ column, record }">

+ 48 - 6
src/views/cuspCode/CustomerProfile/CuspCustomerProfile.data.ts

@@ -263,8 +263,22 @@ export const formSchema: FormSchema[] = [
     colProps: { span: 12 },
     labelWidth: 250,
     required: true,
-    componentProps: {
-      AutoComplete: 'off',
+    componentProps: ({ formModel }) => {
+      return {
+        AutoComplete: 'off',
+        onblur: ({ currentTarget }) => {
+          const stringLog = currentTarget.value;
+          let newString = '';
+          for (let i = 0; i < stringLog.length; i++) {
+            if (/^[A-Za-z]$/.test(stringLog[i]) && /^[a-z]$/.test(stringLog[i])) {
+              newString = newString + stringLog[i].toUpperCase();
+            } else {
+              newString = newString + stringLog[i];
+            }
+          }
+          formModel.name = newString;
+        },
+      };
     },
   },
   {
@@ -273,8 +287,22 @@ export const formSchema: FormSchema[] = [
     component: 'Input',
     labelWidth: 200,
     colProps: { span: 12 },
-    componentProps: {
-      AutoComplete: 'off',
+    componentProps: ({ formModel }) => {
+      return {
+        AutoComplete: 'off',
+        onblur: ({ currentTarget }) => {
+          const stringLog = currentTarget.value;
+          let newString = '';
+          for (let i = 0; i < stringLog.length; i++) {
+            if (/^[A-Za-z]$/.test(stringLog[i]) && /^[a-z]$/.test(stringLog[i])) {
+              newString = newString + stringLog[i].toUpperCase();
+            } else {
+              newString = newString + stringLog[i];
+            }
+          }
+          formModel.abbreviation = newString;
+        },
+      };
     },
   },
   {
@@ -283,8 +311,22 @@ export const formSchema: FormSchema[] = [
     component: 'Input',
     labelWidth: 250,
     colProps: { span: 12 },
-    componentProps: {
-      AutoComplete: 'off',
+    componentProps: ({ formModel }) => {
+      return {
+        AutoComplete: 'off',
+        onblur: ({ currentTarget }) => {
+          const stringLog = currentTarget.value;
+          let newString = '';
+          for (let i = 0; i < stringLog.length; i++) {
+            if (/^[A-Za-z]$/.test(stringLog[i]) && /^[a-z]$/.test(stringLog[i])) {
+              newString = newString + stringLog[i].toUpperCase();
+            } else {
+              newString = newString + stringLog[i];
+            }
+          }
+          formModel.abbreviation = newString;
+        },
+      };
     },
   },
   {

+ 8 - 7
src/views/publicComponents/SelectPrpductModal.vue

@@ -14,11 +14,11 @@
                 <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="分类(class)">
-                            <!-- <a-input placeholder="请输入" v-model:value="queryParams.classId"></a-input> -->
-                            <JSelectInput   v-model:value="queryParams.classId"  placeholder="请选择" :options="classOption" ></JSelectInput>
-                        </a-form-item>
-                    </a-col>
+                            <a-form-item label="备件号(partno)">
+                                <j-input placeholder="请输入" v-model:value="queryParams.partno"></j-input>
+                            </a-form-item>
+                        </a-col>
+                   
                     <a-col :md="6" :sm="8">
                         <a-form-item label="中文名(Chinese name)">
                             <j-input placeholder="请输入" v-model:value="queryParams.chineseName"></j-input>
@@ -31,8 +31,9 @@
                             </a-form-item>
                         </a-col>
                         <a-col :md="6" :sm="8">
-                            <a-form-item label="备件号(partno)">
-                                <j-input placeholder="请输入" v-model:value="queryParams.partno"></j-input>
+                            <a-form-item label="分类(class)">
+                                <!-- <a-input placeholder="请输入" v-model:value="queryParams.classId"></a-input> -->
+                                <JSelectInput   v-model:value="queryParams.classId"  placeholder="请选择" :options="classOption" ></JSelectInput>
                             </a-form-item>
                         </a-col>
                         <a-col :md="6" :sm="8">

+ 12 - 5
src/views/purchase/purchaseInquiryForm/components/PurchaseInquiryFormForm.vue

@@ -93,12 +93,17 @@
 							</a-form-item>
 						</a-col>
             <a-col :span="12">
-							<a-form-item label="协议条款(agreement terms)" v-bind="validateInfos.agreementTerms" id="SaleOrderForm-agreementTerms" name="agreementTerms"  >
-								<a-textarea v-model:value="formData.agreementTerms" AutoComplete="off" :rows="2" ></a-textarea>
+							<a-form-item label="销售说明(sale notes)" v-bind="validateInfos.saleNotes" id="SaleOrderForm-saleNotes" name="saleNotes"  >
+								<a-textarea v-model:value="formData.saleNotes" AutoComplete="off" :rows="2" ></a-textarea>
 							</a-form-item>
-						</a-col>   
+						</a-col> 
+            <a-col :span="12">
+              <a-form-item label="协议条款(agreement terms)" v-bind="validateInfos.agreementTerms" id="SaleOrderForm-agreementTerms" name="agreementTerms"   :label-col="formItemLayout.labelCol1" :wrapper-col="formItemLayout.wrapperCol1">
+                  <a-textarea v-model:value="formData.agreementTerms" AutoComplete="off" :rows="2" ></a-textarea>
+              </a-form-item>
+            </a-col>   
 						<a-col :span="12">
-							<a-form-item label="附件(attachs)" v-bind="validateInfos.attachs" id="PuechaseInquiryFormForm-attachs" name="attachs" :label-col="formItemLayout.labelCol1" :wrapper-col="formItemLayout.wrapperCol1">
+							<a-form-item label="附件(attachs)" v-bind="validateInfos.attachs" id="PuechaseInquiryFormForm-attachs" name="attachs">
 								<JUpload v-model:value="formData.attachs"></JUpload>
 							</a-form-item>
 						</a-col>
@@ -254,7 +259,8 @@
         saleAttachs:'',
         paymentTermsInfo:'',
         sourceId:"",
-        agreementTerms:''
+        agreementTerms:'',
+        saleNotes:''
       });
 
       //表单验证
@@ -449,6 +455,7 @@
         formData.inquiryTeamName = data[0].inquiryTeam_dictText
         formData.productionClass =  data[0].productionClass
         formData.saleAttachs =data[0].attachs
+        formData.saleNotes = data[0].inquiryNotes
         getShipList(data[0].headId)
       }
       function getShipList(id){

+ 1 - 1
src/views/purchase/purchaseQuotationFrm/PurchaseQuotationForm.data.ts

@@ -273,7 +273,7 @@ export const PuechaseQuotationFormProductColumns: JVxeColumn[] = [
     {
       title: '单价(price)',
       key: 'taxPrice',
-      type: JVxeTypes.input,
+      type: JVxeTypes.inputNumber,
       placeholder: '请输入${title}',
       defaultValue:'',  
       width:"200px",

+ 16 - 9
src/views/saleCode/quotation/components/quotationFormForm.vue

@@ -488,7 +488,7 @@
           var obj = await getRowRate(item)
           item.taxRate = obj.rateNumber
           item.grossMargin = obj.grossMargin
-          item.discount= formData.custumerDiscount!==''?formData.custumerDiscount:''
+          item.discount= formData.custumerDiscount
         }
         var arrProduct = data.concat(saleQuotationFormProductTable.dataSource)
         saleQuotationFormProductTable.dataSource=arrProduct    
@@ -517,7 +517,7 @@
           if(saleQuotationFormProductTable.dataSource.length>0){
             var newArr = [...saleQuotationFormProductTable.dataSource]
             newArr.map(item=>{
-              item.discount =  formData.custumerDiscount
+              item.discount = formData.custumerDiscount
             })
             saleQuotationFormProductTable.dataSource = newArr
           }
@@ -660,7 +660,7 @@
             if(event.value==formData.quotationCustomer){
               item.intermediatorCommission = event.intermediatorCommission,
               item.customerCommision = event.commission
-              formData.custumerDiscount=event.discount
+              formData.custumerDiscount=event.discoun
               item.discount = event.discount
               formData.paymentTerms = event.paymentTerms
               formData.currency=event.currency
@@ -679,7 +679,8 @@
         formData.deliveryDayHead =  data[0].deliveryDayChild
         formData.currency =  '美元'
         formData.exchangeRate =  '1'
-        getShipList(data[0].headId)
+        await getShipList(data[0].headId)
+        // await changeDiscountOrExchangeRate()
       }
       function getShipList(id){
         let params = {id:id}
@@ -717,11 +718,13 @@
           return obj
       }
       function changeValues(prop){
+        formData.exchangeRate = (formData.exchangeRate==''||formData.exchangeRate===null)?1:formData.exchangeRate
+        prop.row.customerCommision = (prop.row.customerCommision==''||prop.row.customerCommision===null||!prop.row.customerCommision)?0:prop.row.customerCommision
+        prop.row.discount = (prop.row.discount==''||prop.row.discount===null||!prop.row.discount)?0:prop.row.discount
+        prop.row.tariff = (prop.row.tariff==''||prop.row.tariff===null||!prop.row.tariff)?0:prop.row.tariff
+        prop.row.intermediatorCommission = (prop.row.intermediatorCommission==''||prop.row.intermediatorCommission===null||!prop.row.intermediatorCommission)?0:prop.row.intermediatorCommission
         if(prop.col.key=='purchasePrice'||prop.col.key=='taxRate'||prop.col.key=='tariff'||prop.col.key=='discount'||prop.col.key=='grossMargin'||prop.col.key=='customerCommision'||prop.col.key=='intermediatorCommission'){
           //汇率默认为1
-            formData.exchangeRate = (formData.exchangeRate==''||formData.exchangeRate===null)?1:formData.exchangeRate
-            prop.row.customerCommision = (prop.row.customerCommision==''||prop.row.customerCommision===null||!prop.row.customerCommision)?0:prop.row.customerCommision
-            prop.row.intermediatorCommission = (prop.row.intermediatorCommission==''||prop.row.intermediatorCommission===null||!prop.row.intermediatorCommission)?0:prop.row.intermediatorCommission
             var num= prop.row.purchasePrice/Number(formData.exchangeRate)*(1+prop.row.taxRate/100)*(1+prop.row.tariff/100)*(1-prop.row.discount/100)/(1-prop.row.grossMargin/100-prop.row.customerCommision/100-prop.row.intermediatorCommission/100)
             
             prop.row.salePrice = !isNaN(num)?num.toFixed(2):''
@@ -736,15 +739,19 @@
           var num = 1-( ((prop.row.purchasePrice/Number(formData.exchangeRate)*(1+prop.row.taxRate/100)*(1+prop.row.tariff/100)*(1-prop.row.discount/100))/prop.row.salePrice)+(prop.row.customerCommision/100-prop.row.intermediatorCommission/100))
           num = (Number(num)*100).toFixed(2)
           prop.row.grossMargin = !isNaN(num)?num:''
+          if(prop.row.quantity){
+              prop.row.taxAmount =  (prop.row.salePrice*prop.row.quantity).toFixed(2)
+          }
         }
       }
       function changeDiscountOrExchangeRate(){
         if(saleQuotationFormProductTable.dataSource.length>0){
           const xTable = saleQuotationFormProductTableRef.value!.getXTable();
           var newArr = [...xTable.data]
-          formData.exchangeRate = (formData.exchangeRate==''||formData.exchangeRate===null)?1:formData.exchangeRate
+          formData.exchangeRate = (formData.exchangeRate==''||formData.exchangeRate===null||!formData.exchangeRate)?1:formData.exchangeRate
           newArr.map(item=>{
-                item.discount =  (formData.custumerDiscount==''||formData.custumerDiscount===null)?formData.custumerDiscount:item.discount
+                item.discount =  (formData.custumerDiscount==''||formData.custumerDiscount===null||!formData.custumerDiscount)?0:formData.custumerDiscount
+                item.tariff =  (item.tariff==''||item.tariff===null||!item.tariff)?0:item.tariff
                 item.customerCommision = (item.customerCommision==''||item.customerCommision===null||!item.customerCommision)?0:item.customerCommision
                 item.intermediatorCommission = (item.intermediatorCommission==''||item.intermediatorCommission===null||!item.intermediatorCommission)?0:item.intermediatorCommission
                 //汇率默认为1