Răsfoiți Sursa

Merge branch 'dev0.3' of http://36.137.93.232:3000/hf/byte-sailing-new into dev0.3

cz 1 an în urmă
părinte
comite
4520ed47b6

+ 10 - 12
src/components/process/Contract.vue

@@ -157,10 +157,9 @@
                       v-model="row.quantity"
                       placeholder="请输入数量"
                       style="width: 100%"
-                      :precision="4"
                       :controls="false"
                       :min="0"
-                      @change="calculationAmount()" />
+                      @change="calculationAmount" />
                   </el-form-item>
                 </div>
               </template>
@@ -174,10 +173,9 @@
                       v-model="row.price"
                       placeholder="请输入单价"
                       style="width: 100%"
-                      :precision="2"
                       :controls="false"
                       :min="0"
-                      @change="calculationAmount()" />
+                      @change="calculationAmount" />
                   </el-form-item>
                 </div>
               </template>
@@ -424,10 +422,9 @@
                       v-model="row.quantity"
                       placeholder="请输入数量"
                       style="width: 100%"
-                      :precision="4"
                       :controls="false"
                       :min="0"
-                      @change="calculationAmount()" />
+                      @change="calculationAmount" />
                   </el-form-item>
                 </div>
               </template>
@@ -1115,13 +1112,14 @@ const handleRemove = async (index, row) => {
   totalAmount();
   getDecisionAids();
 };
-const calculationAmount = () => {
+const calculationAmount = (val) => {
+  console.log(val, "aaa");
   nextTick(() => {
     if (formData.data.contractProductList && formData.data.contractProductList.length > 0) {
       for (let i = 0; i < formData.data.contractProductList.length; i++) {
         let money = 0;
         if (formData.data.contractProductList[i].quantity && formData.data.contractProductList[i].price) {
-          money = parseFloat(Number(formData.data.contractProductList[i].quantity) * Number(formData.data.contractProductList[i].price)).toFixed(2);
+          money = parseFloat(Number(formData.data.contractProductList[i].quantity) * Number(formData.data.contractProductList[i].price)).toFixed(4);
         }
         formData.data.contractProductList[i].amount = money;
       }
@@ -1136,14 +1134,14 @@ const totalAmount = () => {
   if (formData.data.contractProductList && formData.data.contractProductList.length > 0) {
     for (let i = 0; i < formData.data.contractProductList.length; i++) {
       if (formData.data.contractProductList[i].amount) {
-        money = parseFloat(Number(money) + Number(formData.data.contractProductList[i].amount)).toFixed(2);
+        money = parseFloat(Number(money) + Number(formData.data.contractProductList[i].amount)).toFixed(4);
       }
     }
   }
   if (formData.data.contractProjectList && formData.data.contractProjectList.length > 0) {
     for (let i = 0; i < formData.data.contractProjectList.length; i++) {
       if (formData.data.contractProjectList[i].amount) {
-        money = parseFloat(Number(money) + Number(formData.data.contractProjectList[i].amount)).toFixed(2);
+        money = parseFloat(Number(money) + Number(formData.data.contractProjectList[i].amount)).toFixed(4);
       }
     }
   }
@@ -1260,7 +1258,7 @@ watch(
       }
       getDecisionAids();
     }
-    console.log('111');
+    console.log("111");
   },
   {
     deep: true,
@@ -1279,7 +1277,7 @@ const acquireSelectList = () => {
   return data;
 };
 onMounted(() => {
-  if(!route.query.processType || route.query.processType == 30) {
+  if (!route.query.processType || route.query.processType == 30) {
     proxy.post("/customer/privateSeaPage", { pageNum: 1, pageSize: 999 }).then((res) => {
       customerList.value = res.rows.map((item) => {
         return {

+ 24 - 33
src/views/salesMange/saleContract/contract/index.vue

@@ -15,15 +15,6 @@
           },
         ]"
         @get-list="getList">
-        <!-- <template #code="{ item }">
-          <div style="width: 100%">
-            <a
-              style="color: #409eff; cursor: pointer; word-break: break-all"
-              @click="pushProcessApproval(item)"
-              >{{ item.code }}</a
-            >
-          </div>
-        </template> -->
         <template #code="{ item }">
           <div style="width: 100%">
             <a style="color: #409eff; cursor: pointer; word-break: break-all" @click="openDetails(item)">{{ item.code }}</a>
@@ -37,13 +28,11 @@
         </template>
         <template #amountCNY="{ item }">
           <div>
-            <!-- <span style="padding-right: 4px">{{ item.currency }}</span> -->
             <span>{{ moneyFormat(item.amountCNY, 2) }}</span>
           </div>
         </template>
         <template #sumClaimMoney="{ item }">
           <div>
-            <!-- <span style="padding-right: 4px">{{ item.currency }}</span> -->
             <span>{{ moneyFormat(item.sumClaimMoney, 2) }}</span>
           </div>
         </template>
@@ -65,6 +54,11 @@
             <span :style="getStyle(item.status)">{{ dictValueLabel(item.status, status) }}</span>
           </div>
         </template>
+        <template #buyCorporationId="{ item }">
+          <div style="cursor: pointer; color: #409eff; word-break: break-all" @click="handleClickName(item)">
+            {{ item.buyCorporationName }}
+          </div>
+        </template>
       </byTable>
     </div>
 
@@ -184,7 +178,7 @@ const config = computed(() => {
       attrs: {
         label: "合同类型",
         prop: "contractType",
-        width: 120,
+        width: 100,
       },
       render(type) {
         return proxy.dictValueLabel(type, contractType.value);
@@ -194,31 +188,22 @@ const config = computed(() => {
       attrs: {
         label: "合同编码",
         slot: "code",
-        width: 180,
+        width: 160,
       },
     },
     {
       attrs: {
         label: "客户",
-        prop: "buyCorporationId",
+        slot: "buyCorporationId",
         "min-width": 180,
       },
-      render(type) {
-        return proxy.dictValueLabel(type, customerList.value);
-      },
     },
-    // {
-    //   attrs: {
-    //     label: "版本号",
-    //     prop: "version",
-    //     width: 80,
-    //   },
-    // },
     {
       attrs: {
         label: "合同金额",
         slot: "amount",
         width: 120,
+        align: "right",
       },
     },
     {
@@ -226,6 +211,7 @@ const config = computed(() => {
         label: "合同金额(CNY)",
         slot: "amountCNY",
         width: 120,
+        align: "right",
       },
     },
     {
@@ -233,6 +219,7 @@ const config = computed(() => {
         label: "已到账金额(CNY)",
         slot: "sumClaimMoney",
         width: 140,
+        align: "right",
       },
     },
     {
@@ -353,15 +340,11 @@ const config = computed(() => {
             },
             el: "button",
             click() {
-              ElMessageBox.confirm(
-                "此操作将作废该数据, 是否继续?",
-                "提示",
-                {
-                  confirmButtonText: "确定",
-                  cancelButtonText: "取消",
-                  type: "warning",
-                }
-              ).then(() => {
+              ElMessageBox.confirm("此操作将作废该数据, 是否继续?", "提示", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+                type: "warning",
+              }).then(() => {
                 proxy
                   .post("/contract/edit", {
                     id: row.id,
@@ -596,6 +579,14 @@ const getStyle = (status) => {
     return {};
   }
 };
+const handleClickName = (row) => {
+  proxy.$router.push({
+    path: "/ERP/customer/portrait",
+    query: {
+      id: row.buyCorporationId,
+    },
+  });
+};
 </script>
 
 <style lang="scss" scoped>