Browse Source

部分bug解决更改

cz 1 năm trước cách đây
mục cha
commit
cf3f644719

+ 6 - 0
src/components/process/SF/Contract.vue

@@ -2339,6 +2339,7 @@ const getPriceSheetData = (id) => {
       buyContactNumber: res.buyContactNumber,
       amount: res.amount,
     };
+    changeCustomer(res.buyCorporationId);
     // if (res.type == 1) {
     //   formData.data.contractType = "2";
     //   if (currencyData.value && currencyData.value.length > 0) {
@@ -2352,8 +2353,13 @@ const getPriceSheetData = (id) => {
       quotationProductId: x.id,
       fileUrl: "",
       productId: x.productId,
+      productClassifyName: x.productClassifyName,
       productName: x.productName,
       productCode: x.productCode,
+      productColor: x.productColor,
+      productFrontalTexture: x.productFrontalTexture,
+      productNetWeight: x.productNetWeight,
+      productUnit: x.productUnit,
       productLength: x.productLength,
       productWidth: x.productWidth,
       productHeight: x.productHeight,

+ 19 - 8
src/components/process/SF/ContractChange.vue

@@ -468,7 +468,7 @@
                 </div>
               </template>
             </el-table-column>
-            <el-table-column label="工厂供货价" prop="factoryPrice" width="100">
+            <el-table-column label="业务供货价" prop="businessCostPrice" width="100">
             </el-table-column>
             <el-table-column prop="amount" label="小计" width="110">
               <template #default="{ row, $index }">
@@ -477,7 +477,7 @@
                 </div>
               </template>
             </el-table-column>
-            <el-table-column prop="amountTwo" label="出厂小计金额" width="110">
+            <el-table-column prop="amountTwo" label="业务小计金额" width="110">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
                   ¥ {{row.amountTwo}}
@@ -1224,7 +1224,7 @@ const formConfig = computed(() => {
     {
       type: "input",
       prop: "factoryAmount",
-      label: "出⼚总⾦额",
+      label: "业务总⾦额",
       itemWidth: 25,
       disabled: true,
     },
@@ -1315,9 +1315,9 @@ const rules = ref({
   buyContactName: [
     { required: true, message: "请输入联系人", trigger: ["change", "blur"] },
   ],
-  buyContactNumber: [
-    { required: true, message: "请输入联系电话", trigger: "blur" },
-  ],
+  // buyContactNumber: [
+  //   { required: true, message: "请输入联系电话", trigger: "blur" },
+  // ],
   quantity: [{ required: true, message: "请输入数量", trigger: "blur" }],
   price: [{ required: true, message: "请输入单价", trigger: "blur" }],
   payName: [
@@ -1711,7 +1711,7 @@ const selectProduct = async (goods) => {
           prodFilePath: goods.prodFilePath,
           quantity: null,
           price: goods.price || null,
-          factoryPrice: goods.factoryPrice || null,
+          businessCostPrice: goods.businessCostPrice || null,
           amount: "",
           remark: "",
           fileList: [],
@@ -1847,7 +1847,7 @@ const calculationAmount = (flag = false) => {
       ).toFixed(2);
       formData.data.contractProductList[i].amountTwo = parseFloat(
         Number(formData.data.contractProductList[i].quantity) *
-          Number(formData.data.contractProductList[i].factoryPrice)
+          Number(formData.data.contractProductList[i].businessCostPrice)
       ).toFixed(2);
       let row = formData.data.contractProductList[i];
       if (flag) {
@@ -2326,6 +2326,7 @@ const getPriceSheetData = (id) => {
     formData.data = res;
     formData.data = {
       contractType: route.query.contractType,
+      salesmanId: proxy.useUserStore().user.userId,
       templateContent: "",
       quotationId: res.id,
       // companyId: res.companyId,
@@ -2338,6 +2339,7 @@ const getPriceSheetData = (id) => {
       buyContactNumber: res.buyContactNumber,
       amount: res.amount,
     };
+    changeCustomer(res.buyCorporationId);
     // if (res.type == 1) {
     //   formData.data.contractType = "2";
     //   if (currencyData.value && currencyData.value.length > 0) {
@@ -2351,8 +2353,13 @@ const getPriceSheetData = (id) => {
       quotationProductId: x.id,
       fileUrl: "",
       productId: x.productId,
+      productClassifyName: x.productClassifyName,
       productName: x.productName,
       productCode: x.productCode,
+      productColor: x.productColor,
+      productFrontalTexture: x.productFrontalTexture,
+      productNetWeight: x.productNetWeight,
+      productUnit: x.productUnit,
       productLength: x.productLength,
       productWidth: x.productWidth,
       productHeight: x.productHeight,
@@ -2360,6 +2367,10 @@ const getPriceSheetData = (id) => {
       quantity: x.quantity,
       price: x.price,
       amount: x.amount,
+      businessCostPrice: x.businessCostPrice,
+      amountTwo: Number(
+        parseFloat(x.quantity * x.businessCostPrice).toFixed(2)
+      ),
       fileList: [],
       contractProductBomList: x.quotationProductBomList.map((y) => {
         y.quotationProductBomId = y.id;

+ 6 - 6
src/views/EHSD/productLibrary/companyProduct/index.vue

@@ -1279,13 +1279,13 @@ const openExcel = () => {
 
 const submitForm = () => {
   formDom.value.handleSubmit((valid) => {
-    if (!formData.data.fileList.length > 0) {
-      return proxy.msgTip("请上传图片", 2);
-    }
+    // if (!formData.data.fileList.length > 0) {
+    //   return proxy.msgTip("请上传图片", 2);
+    // }
 
-    if (!formData.data.prodFileList.length > 0) {
-      return proxy.msgTip("请上传生产plt文件", 2);
-    }
+    // if (!formData.data.prodFileList.length > 0) {
+    //   return proxy.msgTip("请上传生产plt文件", 2);
+    // }
 
     if (
       !(

+ 6 - 6
src/views/EHSD/productLibrary/waitCreateProduct/index.vue

@@ -1109,12 +1109,12 @@ const openExcel = () => {
 
 const submitForm = () => {
   formDom.value.handleSubmit((valid) => {
-    if (!formData.data.fileList.length > 0) {
-      return proxy.msgTip("请上传图片", 2);
-    }
-    if (!formData.data.prodFileList.length > 0) {
-      return proxy.msgTip("请上传生产plt文件", 2);
-    }
+    // if (!formData.data.fileList.length > 0) {
+    //   return proxy.msgTip("请上传图片", 2);
+    // }
+    // if (!formData.data.prodFileList.length > 0) {
+    //   return proxy.msgTip("请上传生产plt文件", 2);
+    // }
 
     if (
       !(

+ 12 - 11
src/views/EHSD/saleContract/priceSheetEHSD/index.vue

@@ -1898,17 +1898,17 @@ const formConfig = computed(() => {
       slotName: "commodity",
       label: "",
     },
-    {
-      type: "title1",
-      title: "报价总金额",
-    },
-    {
-      type: "input",
-      prop: "amount",
-      label: "报价总金额",
-      itemWidth: 25,
-      disabled: true,
-    },
+    // {
+    //   type: "title1",
+    //   title: "报价总金额",
+    // },
+    // {
+    //   type: "input",
+    //   prop: "amount",
+    //   label: "报价总金额",
+    //   itemWidth: 25,
+    //   disabled: true,
+    // },
   ];
 });
 const rules = ref({
@@ -1969,6 +1969,7 @@ const getCityData = (id, type, isChange = false) => {
 getCityData("0");
 
 const changeCustomer = (val) => {
+  return;
   formData.data.quotationProductList = [];
   if (val) {
     proxy.post("/customer/detail", { id: val }).then(

+ 2 - 1
src/views/index.vue

@@ -419,12 +419,13 @@ const getData = () => {
     .then((res) => {
       toBeProcessedData.value = res;
     });
+  // proxy.useUserStore().user.companyId == "100" ? "" :"1"
   // 待报价
   proxy
     .post("/saleQuotation/page", {
       pageNum: 1,
       pageSize: 5,
-      isEstimate: proxy.useUserStore().user.companyId == "100" ? "" : "1",
+      isEstimate: "1",
     })
     .then((res) => {
       allData.value[0] = res;